Re: python: finding specific library version via CMake

2015-06-30 Thread Mark Moll
On Jun 29, 2015, at 9:18 PM, Mark Moll mm...@rice.edu wrote: On Jun 29, 2015, at 8:10 PM, Ryan Schmidt ryandes...@macports.org wrote: On Jun 24, 2015, at 3:04 PM, Mark Moll wrote: Part of the problem is that there is no way to force the default CMake modules for finding an python

Re: python: finding specific library version via CMake

2015-06-29 Thread Michael Dickens
In CMake, to find an exact required specific version, you can use EXACT and REQUIRED, e.g: find_package(python 3.4.3 EXACT REQUIRED) That said, the provided FindPython sucks, in that if multiple versions of Python are installed it will generally find part in the CMAKE_INSTALL_PREFIX and

Re: python: finding specific library version via CMake

2015-06-29 Thread Ryan Schmidt
On Jun 24, 2015, at 3:04 PM, Mark Moll wrote: Part of the problem is that there is no way to force the default CMake modules for finding an python interpreter and python libraries to agree on the same version. As a way around that I wrote my own FindPython.cmake:

Re: python: finding specific library version via CMake

2015-06-29 Thread Mark Moll
On Jun 29, 2015, at 8:10 PM, Ryan Schmidt ryandes...@macports.org wrote: On Jun 24, 2015, at 3:04 PM, Mark Moll wrote: Part of the problem is that there is no way to force the default CMake modules for finding an python interpreter and python libraries to agree on the same version.

Re: python: finding specific library version via CMake

2015-06-24 Thread René J . V . Bertin
On Tuesday June 23 2015 16:27:57 Ryan Schmidt wrote: On Jun 23, 2015, at 4:21 PM, René J.V. Bertin wrote: Hairy detail: this project requires exactly Python 3.4.3 - nothing more, nothing less... I guess it'll work today, and break when the python34 port is updated to 3.4.4. Not a great

Re: python: finding specific library version via CMake

2015-06-24 Thread René J . V . Bertin
On Tuesday June 23 2015 16:04:39 Ryan Schmidt wrote: My impression is that cmake is horrible at many things, including finding dependencies, and that you're best off bypassing automatic dependency finding by specifying the absolute path to every dependency About that: how do I get the

Re: python: finding specific library version via CMake

2015-06-24 Thread Mark Moll
Part of the problem is that there is no way to force the default CMake modules for finding an python interpreter and python libraries to agree on the same version. As a way around that I wrote my own FindPython.cmake: https://bitbucket.org/ompl/ompl/src/tip/CMakeModules/FindPython.cmake You

Re: python: finding specific library version via CMake

2015-06-24 Thread René J . V . Bertin
On Wednesday June 24 2015 15:04:32 Mark Moll wrote: Part of the problem is that there is no way to force the default CMake modules for finding an python interpreter and python libraries to agree on the same version. As a way around that I wrote my own FindPython.cmake:

Re: python: finding specific library version via CMake

2015-06-23 Thread Ryan Schmidt
On Jun 23, 2015, at 4:21 PM, René J.V. Bertin wrote: Hairy detail: this project requires exactly Python 3.4.3 - nothing more, nothing less... I guess it'll work today, and break when the python34 port is updated to 3.4.4. Not a great requirement for a project to have.

Re: python: finding specific library version via CMake

2015-06-23 Thread Ryan Schmidt
On Jun 22, 2015, at 4:01 PM, René J.V. Bertin wrote: I have a CMake file that has the following, hopefully self-explanatory, bit: {{{ find_package(PythonLibs 3.4.3 REQUIRED) if ( NOT ${PYTHONLIBS_FOUND} OR ${PYTHON_VERSION_MINOR} GREATER 4 ) message(FATAL_ERROR Python 3.4.3 with

Re: python: finding specific library version via CMake

2015-06-23 Thread René J . V . Bertin
On Tuesday June 23 2015 16:04:39 Ryan Schmidt wrote: My impression is that cmake is horrible at many things, including finding dependencies, and giving constructive answers on its ML ;) and that you're best off bypassing automatic dependency finding by specifying the absolute path to

python: finding specific library version via CMake

2015-06-22 Thread René J . V . Bertin
Hi, I have a CMake file that has the following, hopefully self-explanatory, bit: {{{ find_package(PythonLibs 3.4.3 REQUIRED) if ( NOT ${PYTHONLIBS_FOUND} OR ${PYTHON_VERSION_MINOR} GREATER 4 ) message(FATAL_ERROR Python 3.4.3 with --enable-shared is required) endif() }}} The only thing that