scikit-build / cython-cmake

CMake helpers for building Cython modules
Apache License 2.0
4 stars 0 forks source link

Pull code from vyasr/cython-cmake/ #2

Closed vyasr closed 5 months ago

vyasr commented 7 months ago

@jcfr I've got the full package largely working in https://github.com/vyasr/cython-cmake/. I think we should either delete this repository and migrate that one into the scikit-build org, or force push all the changes from that repo to overwrite the code in this one. It looks like the only code in this repo at the moment is from some cookiecutter-like template, so either approach should be safe.

vyasr commented 7 months ago

There are still some significant changes that need to be made before my cython-cmake is ready for a release, but they're mostly around things like CI or Windows support and would be better handled in a shared repository rather than one that I own.

jcfr commented 6 months ago

Thanks for consolidating your work into the cython-cmake repository :pray: This will be helpful :rocket:

jcfr commented 5 months ago

History associated with the files FindCython.cmake and UseCython.cmake from the repositories thewtex/cython-cmake-example^1 and scikit-build/scikit-build^2 has been extracted and integrated into this project.

Then, relevant updates from vyasr/cython-cmake have been adapted.

The modernized function is called Cython_compile_pyx and it internally passes the -M^3 flag to cython as well as the corresponding custom command parameter called DEPFILE^4.

The CMake modules are distributed in the cython-cmake wheel. See https://pypi.org/project/cython-cmake/

#   Cython_compile_pyx(<pyx_file1> [<pyx_file2> ...]
#                     [TARGET_LANGUAGE C | CXX]
#                     [LANGUAGE_LEVEL 2 | 3 | 3str]
#                     [OUTPUT_VAR <OutputVar>])
jcfr commented 5 months ago

The core-cython-hello sample project has also been updated to use the Cython_compile_pyx function. See https://github.com/scikit-build/scikit-build-sample-projects/pull/43