Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull code from vyasr/cython-cmake/ #2

Closed
vyasr opened this issue Nov 27, 2023 · 4 comments
Closed

Pull code from vyasr/cython-cmake/ #2

vyasr opened this issue Nov 27, 2023 · 4 comments

Comments

@vyasr
Copy link
Contributor

vyasr commented Nov 27, 2023

@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
Copy link
Contributor Author

vyasr commented Nov 27, 2023

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
Copy link
Contributor

jcfr commented Dec 14, 2023

Thanks for consolidating your work into the cython-cmake repository 🙏
This will be helpful 🚀

@jcfr
Copy link
Contributor

jcfr commented Jan 25, 2024

History associated with the files FindCython.cmake and UseCython.cmake from the repositories thewtex/cython-cmake-example1 and scikit-build/scikit-build2 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 -M3 flag to cython as well as the corresponding custom command parameter called DEPFILE4.

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>])

Footnotes

  1. https://github.com/thewtex/cython-cmake-example/tree/master/cmake

  2. https://github.com/scikit-build/scikit-build/tree/main/skbuild/resources/cmake

  3. https://cython.readthedocs.io/en/latest/src/changes.html#build-integration

  4. https://cmake.org/cmake/help/latest/command/add_custom_command.html

@jcfr jcfr closed this as completed Jan 25, 2024
@jcfr
Copy link
Contributor

jcfr commented Jan 25, 2024

The core-cython-hello sample project has also been updated to use the Cython_compile_pyx function. See scikit-build/scikit-build-sample-projects#43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants