View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0010279 | CMake | Modules | public | 2010-02-12 09:10 | 2011-05-02 14:45 | ||||
Reporter | Didier Raboud | ||||||||
Assigned To | Marcus D. Hanwell | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | ||||||
Summary | 0010279: cmake-data: FindPython{Interp,Libs}.cmake should take the desired python version as argument | ||||||||
Description | Hi, FindPythonInterp and FindPythonLibs correctly find the most recent python binary and libraries. But when cmake is used for a Debian package, it is convenient to be able to select the python version you want. Without that feature, if one wants a package build against more than one version of python, he is forced to patching and hackery. See e.g: http://patch-tracker.debian.org/patch/series/view/pyside/0.2.3-1/multiple_python_versions.patch [^] So if we could simply feed a "-DPYTHON_VERSION 2.6" to cmake, it would be really cool. Thanks in advance for consideration and best regards, OdyX | ||||||||
Additional Information | This bug was reported in the Debian bug tracker, where there are patches already: http://bugs.debian.org/569321 [^] | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | FindPythonInterp.cmake.diff [^] (1,740 bytes) 2010-02-12 09:10 [Show Content]
FindPythonLibs.cmake.diff [^] (801 bytes) 2010-02-12 09:10 [Show Content] FindPython_fix_#569321_and_#580503.diff [^] (4,226 bytes) 2010-06-07 10:59 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0019513) Didier Raboud (reporter) 2010-02-12 09:11 |
This could also be extended to use pyversions to narrow the search to installed versions instead of hardcoding the list of versions. |
(0020931) Curan (reporter) 2010-06-07 11:00 |
Debian has addressed this issue with the now attached patch (FindPython_fix_#569321_and_#580503.diff). The latest version can be downloaded from http://git.debian.org/?p=collab-maint/cmake.git;a=blob_plain;f=debian/patches/FindPython_fix_%23569321_and_%23580503.diff;h=2ab6814860ccdae723ae110db9b3f90751d5f102;hb=HEAD [^] |
(0021551) Brad King (manager) 2010-07-29 11:37 |
Currently FindPython has no module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers [^] and therefore we accept no patches to it. If anyone wants to become the module maintainer you will get git push access to the CMake/Modules source directory and can apply patches as necessary. |
(0024542) Marcus D. Hanwell (developer) 2011-01-10 14:03 |
2d3594b begins to address these issues, using an approach similar to Boost. The proposed patch would have caused the Python executable on Windows to be ignored, due to the naming of the executable. Additionally I do not have a pyversions, using Arch Linux. How widely packaged is pyversions? |
(0024552) Curan (reporter) 2011-01-10 15:06 |
Ok, the Windows case wasn't tested, as I don't have Windows around. About pyversions: hm, not sure, but it could(!!) be a Debian-specific thing. I'm not into Python, I just tried to fix a bug in CMake (initially for Debian). Didier (#569321) or Jakub (#580503) are more likely to know that. I'll ping them and maybe one of them can give a good answer. |
(0024557) Curan (reporter) 2011-01-10 15:44 |
Ok, that was fast. Jakub answered, that pyversions is indeed a debianism. The replacement – in his opinion – should be: python -c 'import sys; print "%d.%d" % sys.version_info[:2]' |
(0024590) Marcus D. Hanwell (developer) 2011-01-11 13:05 |
That only gives me the current version of the Python interpreter I found here. We still have to actually find the interpreter too, and some packages would like to find 3.x in preference to 2.x. I think the additional version variable should allow that, and is a step in the right direction for the 2.8.4 release. I don't have time, and the 2.8.4 window is closing, but will try to take a better look at this soon. |
(0024591) Scott Kitterman (reporter) 2011-01-11 13:12 |
You should find Python and Python3 separately since they are incompatible. You probably want FindPython3Interp and FindPython3Libs in addition to FindPythonInterp and FindPythonLibs. |
(0024613) David Cole (manager) 2011-01-12 07:19 |
Marcus, we're including the commit you made on Monday in the first release candidate for CMake 2.8.4. Is this bug then resolved, or is there more work to be done on it? (i.e. -- should I resolve it and mark it as fixed in 2.8.4, or should I leave it open?) Thanks, David |
(0024618) Marcus D. Hanwell (developer) 2011-01-12 10:32 |
I think the initial request made in this bug report is now satisfied - you can supply an ordered list of desired Python versions. There is some debate about consistency, and how to determine this version. I will defer those to future work, and advise people to use Python_ADDITIONAL_VERSIONS to set the Python version they wish, in order of priority. |
(0026334) David Cole (manager) 2011-05-02 14:45 |
Closing resolved issues that have not been updated in more than 3 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-02-12 09:10 | Didier Raboud | New Issue | |
2010-02-12 09:10 | Didier Raboud | File Added: FindPythonInterp.cmake.diff | |
2010-02-12 09:10 | Didier Raboud | File Added: FindPythonLibs.cmake.diff | |
2010-02-12 09:11 | Didier Raboud | Note Added: 0019513 | |
2010-05-08 03:40 | Alex Neundorf | Category | CMake => Modules |
2010-06-07 10:59 | Curan | File Added: FindPython_fix_#569321_and_#580503.diff | |
2010-06-07 11:00 | Curan | Note Added: 0020931 | |
2010-07-29 11:37 | Brad King | Note Added: 0021551 | |
2010-12-14 18:13 | David Cole | Assigned To | => Marcus D. Hanwell |
2010-12-14 18:13 | David Cole | Status | new => assigned |
2011-01-10 14:03 | Marcus D. Hanwell | Note Added: 0024542 | |
2011-01-10 15:06 | Curan | Note Added: 0024552 | |
2011-01-10 15:44 | Curan | Note Added: 0024557 | |
2011-01-11 13:05 | Marcus D. Hanwell | Note Added: 0024590 | |
2011-01-11 13:12 | Scott Kitterman | Note Added: 0024591 | |
2011-01-12 07:19 | David Cole | Note Added: 0024613 | |
2011-01-12 10:32 | Marcus D. Hanwell | Note Added: 0024618 | |
2011-01-12 10:32 | Marcus D. Hanwell | Status | assigned => resolved |
2011-01-12 10:32 | Marcus D. Hanwell | Fixed in Version | => CMake 2.8.4 |
2011-01-12 10:32 | Marcus D. Hanwell | Resolution | open => fixed |
2011-01-12 12:23 | David Cole | Target Version | => CMake 2.8.4 |
2011-05-02 14:45 | David Cole | Note Added: 0026334 | |
2011-05-02 14:45 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |