[KDE/Mac] Review Request 124185: Improved Python macros for CMake

René J.V. Bertin rjvbertin at gmail.com
Fri Jun 26 11:42:41 UTC 2015



> On June 26, 2015, 1:28 p.m., Sven Brauch wrote:
> > Thanks!
> > I think it would be a good idea to put a README next to the CMake module which tells where it is officially maintained, so I can steal it (or the differences) from there again when updating to e.g. Python 3.5.
> > 
> > Did you modify FindPython.cmake? Or can we just copy it from the source again for future versions?

Done (also including the license blurb from the OMPL project).

Yes, I modified the file (as mentioned above ;)), so that it provides the required `PYTHON_VERSION_*` macros.

A priori you won't need to modify it for a Python update, unless Python changes something that breaks the current logic. The exact version info is obtained in the way that should be most reliable: through Python's own`sys.version_info`.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124185/#review81776
-----------------------------------------------------------


On June 26, 2015, 1:16 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124185/
> -----------------------------------------------------------
> 
> (Updated June 26, 2015, 1:16 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdev-python
> 
> 
> Description
> -------
> 
> CMake's default macros for finding Python (`PythonInterp` and `PythonLibs`) do not do a great job across all platforms at finding an exact Python version, at least not when multiple versions are available and esp. not if the desired version is not the default version.
> 
> This patch proposes to use another set of macros, modified from OMPL (https://bitbucket.org/ompl/ompl/src/tip/CMakeModules/FindPython.cmake) that should conform better to the requirements.
> The original `FindPython.cmake` file is covered by a BSD license; the (or one of its) author made me aware of its existence himself.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 18ecfc0 
>   cmake/modules/FindPython.cmake PRE-CREATION 
>   parser/CMakeLists.txt 2ac78fc 
> 
> Diff: https://git.reviewboard.kde.org/r/124185/diff/
> 
> 
> Testing
> -------
> 
> For now, only on OS X 10.9.5 under MacPorts with multiple Python versions installed.
> 
> I have *not* changed the Python version acceptance logic beyond correcting the check of the `PYTHON_FOUND` boolean.
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20150626/d7a89179/attachment.html>


More information about the kde-mac mailing list