diff --git a/cextern/helloworld.c b/cextern/helloworld.c new file mode 100644 index 0000000000000000000000000000000000000000..6c28d43fe5cc99e9139b46d8c4196fe82a3a92a3 --- /dev/null +++ b/cextern/helloworld.c @@ -0,0 +1,15 @@ +// Simple C program to display "Hello World" + +// Header file for input output functions +#include + +// main function - +// where the execution of program begins +int main() +{ + + // prints hello world + printf("Hello World"); + + return 0; +} \ No newline at end of file diff --git a/install_local.sh b/install_local.sh index 7e0632543d0d28529d9cecda8aa81938e8bac690..f34deebdf22b60bc5cb34d34e227bcb14440ee93 100644 --- a/install_local.sh +++ b/install_local.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash rm -rf build rm -rf dist -#python setup.py build_ext --inplace +python setup.py build_ext #python setup.py install python setup.py sdist pip install dist/*.tar.gz --force-reinstall diff --git a/setup.py b/setup.py index 366e9b05458dd0010f42d0a6f238af80cd7f39c2..70a1a8cdf02e2059f9a82584f8a6337be9efd9d4 100644 --- a/setup.py +++ b/setup.py @@ -37,4 +37,9 @@ setuptools.setup( # 'astropy', # ], python_requires='>=3.9', -) + ext_modules=[ + setuptools.Extension( + name="csst_proto.cext.helloworld", sources=["cextern/helloworld.c"] + ) + ] +) \ No newline at end of file