CMake support for Python installation #799
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CMake now builds and installs the Python code in the same way that the old Makefile did, with some additional options to make it work with a separate object directory. This means it's now at parity with the old build system. As packagers may prefer to handle
setup.py
through their own Python mechanism, there's aBUILD_PYTHON
option to skip this.I've switched
setup.py
from distutils to setuptools. We tried this previously and it didn't work on older versions of Ubuntu. It's OK now, maybe because the CMake code is a bit more careful about always settingDESTDIR
- setuptools interprets an empty--root
as the current directory, which is wrong.I've added a
USE_QT_VERSION
option, replacingSEARCH_QT5_ONLY
, so that you can specify either version of Qt explicitly. The CI now uses this to avoid accidentally falling back to the wrong version.CC @oyvindln.