aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-04-18 18:58:18 +0200
committerChristian Tismer <tismer@stackless.com>2021-10-28 10:59:40 +0200
commit5f44fd68e351e28b90636f34556628f5cda134a9 (patch)
treea179cef39c0920353a59c6bbedbdbfa38525feea /build_scripts/main.py
parent3aab0899ef4f966d3a37c0e95b0e7d0f047de3e0 (diff)
PyPySide: add it as a true new build target
PyPy has now an appendix of its name and version at the end of the build path name. There are special settings needed in command.py to locate it in the folder structure. An extra check for PyPy has been added to the test script, because PyPy still has many errors. We use only one test run and extended timeouts until some crucial errors are gone. The blacklist file now understands pypy, pypy.7.3.6 etc. Task-number: PYSIDE-535 Change-Id: Ic2ab88bf35c5a18320733eb2552eca9e4315d04f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/main.py')
-rw-r--r--build_scripts/main.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 142423355..5c11d9054 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -182,6 +182,15 @@ def _get_py_library_unix(build_type, py_version, py_prefix, py_libdir,
return py_library
libs_tried.append(py_library)
+ # PYSIDE-535: See if this is PyPy.
+ if hasattr(sys, "pypy_version_info"):
+ pypy_libdir = os.path.join(os.path.dirname(py_libdir), "bin")
+ for lib_ext in lib_exts:
+ lib_name = f"libpypy3-c{lib_ext}"
+ pypy_library = os.path.join(pypy_libdir, lib_name)
+ if os.path.exists(pypy_library):
+ return pypy_library
+ libs_tried.append(pypy_library)
raise DistutilsSetupError(f"Failed to locate the Python library with {', '.join(libs_tried)}")
@@ -519,6 +528,9 @@ class PysideBuild(_build, DistUtilsCommandMixin):
# Used for test blacklists and registry test.
self.build_classifiers = (f"py{py_version}-qt{qt_version}-{platform.architecture()[0]}-"
f"{build_type.lower()}")
+ if hasattr(sys, "pypy_version_info"):
+ pypy_version = ".".join(map(str, sys.pypy_version_info[:3]))
+ self.build_classifiers += f"-pypy.{pypy_version}"
if OPTION["SHORTER_PATHS"]:
build_name = f"p{py_version}"