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

added C example

parent 07a727fc
Loading
Loading
Loading
Loading
Loading

cextern/helloworld.c

0 → 100644
+15 −0
Original line number Diff line number Diff line
// 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
+1 −1
Original line number Diff line number Diff line
#!/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
+6 −1
Original line number Diff line number Diff line
@@ -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