diff options
authorAlexandru Croitor <>2018-05-25 16:10:46 +0200
committerAlexandru Croitor <>2018-05-31 08:55:17 +0000
commitccddbd5f8e21e05290f04ac0bb2181d6cb90db49 (patch)
parent90c1c767095e583d0315e87c0592597020858246 (diff)
Include manylinux1 in package name for limited API builds on Linux
PyPI only accepts binary Linux packages that are built conforming to PEP 513 / manylinux1 support. The gist of it is that extensions need to be built on CentOS 5, so that they work on most newer distro versions than that. Official Qt can't be built on such an old distro. The minimum requirement is thus CentOS / RHEL 7 (which we used for packaging Qt 5.11.0 on Coin). We do want to upload packages to PyPI, so we have to resort to including "manylinux1" in the name. Currently this is tied to the limited API option. TODO: In the future we should name packages "manylinux1" only when the distro version is acceptable for Qt build requirements (RHEL 7.x). It might get a bit messy though, due to platform.linux_distribution being deprecated, and the necessity to depend on the new "distro" package. Change-Id: Ic4dfccd87d810360cbbfce72b27d5fa31e2a59dd Reviewed-by: Friedemann Kleint <>
1 files changed, 14 insertions, 0 deletions
diff --git a/build_scripts/ b/build_scripts/
index cb022099..ee8bd838 100644
--- a/build_scripts/
+++ b/build_scripts/
@@ -108,6 +108,20 @@ if wheel_module_exists:
plat_name = self.plat_name or wheel_get_platform()
if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647:
plat_name = 'linux_i686'
+ # To allow uploading to pypi, we need the wheel name
+ # to contain 'manylinux1'.
+ # The wheel which will be uploaded to pypi will be
+ # built on RHEL7, so it doesn't completely qualify for
+ # manylinux1 support, but it's the minimum requirement
+ # for building Qt. We only enable this for x64 limited
+ # api builds (which are the only ones uploaded to
+ # pypi).
+ # TODO: Add actual distro detection, instead of
+ # relying on limited_api option.
+ if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize > 2147483647 \
+ and self.py_limited_api:
+ plat_name = 'manylinux1_x86_64'
plat_name = plat_name.replace('-', '_').replace('.', '_')
if self.root_is_pure: