Commit ab1ba559 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added C example

parent 07a727fc
Pipeline #245 passed with stages
in 17 seconds
// Simple C program to display "Hello World"
// Header file for input output functions
#include <stdio.h>
// main function -
// where the execution of program begins
int main()
{
// prints hello world
printf("Hello World");
return 0;
}
\ No newline at end of file
#!/usr/bin/env bash #!/usr/bin/env bash
rm -rf build rm -rf build
rm -rf dist rm -rf dist
#python setup.py build_ext --inplace python setup.py build_ext
#python setup.py install #python setup.py install
python setup.py sdist python setup.py sdist
pip install dist/*.tar.gz --force-reinstall pip install dist/*.tar.gz --force-reinstall
......
...@@ -37,4 +37,9 @@ setuptools.setup( ...@@ -37,4 +37,9 @@ setuptools.setup(
# 'astropy', # 'astropy',
# ], # ],
python_requires='>=3.9', python_requires='>=3.9',
) ext_modules=[
setuptools.Extension(
name="csst_proto.cext.helloworld", sources=["cextern/helloworld.c"]
)
]
)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment