I have attached an alternative module that replaces the two current modules for 
finding python-related info. With the current modules it is easy to end up in a 
situation where the interpreter’s version and the library version do not match, 
which inevitably leads to problems. My version fixes that and defines a number 
of other useful things:
- PYTHON_SITE_MODULES: the directory where python modules should be installed.
- Various PYTHON_VERSION_* variables.
- A find_python_module macro, so that you can do something like 
"find_python_module(numpy REQUIRED)”

If you call "cmake -DPYTHON_EXEC=/my/own/python”, you can be sure that 
everything else is defined appropriately. It is harder to do that with the 
current Python modules. I have been using this module for a while for my own 
project, but perhaps it is useful for inclusion with cmake. Let me know if 
there’s any interest in this.

Best,
Mark

Attachment: FindPython.cmake
Description: Binary data

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to