CMake updates for NastranIO/pyNastran/Cython. - #49
Conversation
- NastranIO adds Python dependency not needed otherwise so we make this support optional.
|
@JohnDN90 its been awhile since I ran Cython. Which of the source files in what you did was generated by cython? I think we should setup CMake to run Cython during configuration rather than committing the final version in the repo. |
|
This file generates the pynastranIO.h and pynastranIO.cpp files after running cythonize on it. I agree that in the end we should have CMake cythonize the .pyx and generate the other two files, I just wanted to include them in the initial commit until we get CMake running cythonize. The NastranIO.cpp and NastranIO.h are manually created by me. |
- Increment to CMake 3.13 requirement due to improved support for adding includes/libraries to targets (3.13) and FindPython (3.12).
e39628b to
28a836a
Compare
- Built-in CMake still seems to have trouble finding consistent interpreter/headers/library when there are multiple options. Has been especially troublesome on macOS or when using Spack built Python.
Just curious, did you have trouble when compiling MAST using the I believe I need to somehow automatically find the path to these numpy headers and be able to feed them to the MAST compilation. |
|
Just answered my last comment. You were using the built-in CMake FindPython3, which finds the Numpy header path and includes it with the regular Python header variable. I replaced it with a custom FindPython3 since the built-in was having trouble with my Spack build. |
- CMake >3.12 able to find Numpy headers itself, but we are using custom FindPython3.
- Option only necessary if developing Python bindings and making changes to pyNastran interface currently.
NastranIO integrated as an optional unit into MAST library via CMake completed.