Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake support for Python installation #799

Merged
merged 4 commits into from
Oct 1, 2022
Merged

Conversation

atsampson
Copy link
Collaborator

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 a BUILD_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 setting DESTDIR - setuptools interprets an empty --root as the current directory, which is wrong.

I've added a USE_QT_VERSION option, replacing SEARCH_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.

We tried this in the past, and it didn't work on older versions of
Ubuntu. Let's try again...
This can be disabled with -DBUILD_PYTHON=OFF for packagers who would
rather handle the Python stuff separately.

Some option gymnastics are necessary to prevent setup.py from creating
dirs in the source tree.
This replaces SEARCH_QT5_ONLY with USE_QT_VERSION. This allows the test
suite, or a packager, to avoid fallback in the case that the intended
version isn't found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants