diff --git a/archive/c/cython/hello_world.pyx b/archive/c/cython/hello_world.pyx new file mode 100644 index 000000000..7cff7c254 --- /dev/null +++ b/archive/c/cython/hello_world.pyx @@ -0,0 +1,9 @@ +from libc.stdio cimport printf + + +cdef main(): + printf(b"%s\n", b"Hello, World!") + + +if __name__ == "__main__": + main() diff --git a/archive/c/cython/testinfo.yml b/archive/c/cython/testinfo.yml new file mode 100644 index 000000000..26585b630 --- /dev/null +++ b/archive/c/cython/testinfo.yml @@ -0,0 +1,11 @@ +folder: + extension: ".pyx" + naming: "underscore" + +container: + image: "rzuckerm/cython" + tag: "3.1.6-1" + build: | + sh -c "cython -3 --embed {{ source.name }}{{ source.extension }} -o {{ source.name }}.c && \ + gcc -o {{ source.name }} $(python3-config --cflags) {{ source.name }}.c $(python3-config --ldflags) -lpython3.12 -fPIC" + cmd: "./{{ source.name }}"