aboutsummaryrefslogtreecommitdiffstats
path: root/wheel_artifacts
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-02 02:22:00 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-29 13:51:35 +0200
commitc565eada8ff164cff07566e1499992327c2536ba (patch)
treed4ea7d7728a8ff9f54459446c59194e39394b83e /wheel_artifacts
parent72309bc9901c4e37ed7e0153668b8df3c52e458f (diff)
build: script to create wheels
This approach intends to avoid modifying the current structure we have in build_scripts, and can replace the call: python setup.py bdist_wheel mainly encouraged by PEP517, and the need of having incremental wheels, to replace the current single PySide6 one. The current configuration allows to create two new wheels: PySide6_Essentials, and PySide6_Addons that contain all the essential and addons Qt modules defined by the Qt Installer tool, with some modifications due to the dependencies of certain tools. Check the README files for more info. The known PySide6 wheel is also generated, but it's empty in favor of using the previous two wheels as requirements, installing them automatically, to avoid modifying the usage of 'pip install pyside6' The strategy is based on the current logic behing 'prepare_packages' that we have been using. Once the modules are built, instead of removing those directories currently in 'build/your_env/package', we rename them. Inside this new directory, one can have the 'shiboken6', 'shiboken6_generator', and 'PySide6' directories, with eveything already packed with the required wheel structure. The main difference is that instead of using the content of PySide6 to build one build, we select some files with the MANIFEST.in to create another wheel. The wheel tag drops the old assumption of needing: cp36.cp37.cp38.cp39.cp310-abi3 and only uses: cp36-abi3 Additionally, for Linux, we follow PEP600 to use the GLIBC version in the wheel name instead of manylinux1, manylinux2010, etc... For the current CI configuration, we know we are using 2.28, which is the minimum supported version for Qt6, so the wheel will look like: PySide6-6.3.0-cp36-abi3-manylinux_2_28_x86_64.whl The coin scripts were configured as well, to add the call of the new create_wheels.py script, and test them via wheel_tester.py Note: This script is not intended to be used as a general purpose wheel creation tool, and it's purely focused on the current Qt CI. There are many ad-hoc configurations used in different functions, like the structure of a Qt installation, the usage of 'a' on the environment for limited-api, etc. Task-number: PYSIDE-1115 Fixes: PYSIDE-692 Change-Id: Ic12e428b8b9b64bbe2facb1c520595ccd2384497 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'wheel_artifacts')
-rw-r--r--wheel_artifacts/pyproject.toml3
-rw-r--r--wheel_artifacts/setup.cfg.base52
-rw-r--r--wheel_artifacts/setup.py.base29
3 files changed, 84 insertions, 0 deletions
diff --git a/wheel_artifacts/pyproject.toml b/wheel_artifacts/pyproject.toml
new file mode 100644
index 000000000..9787c3bdf
--- /dev/null
+++ b/wheel_artifacts/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
diff --git a/wheel_artifacts/setup.cfg.base b/wheel_artifacts/setup.cfg.base
new file mode 100644
index 000000000..9c8b60940
--- /dev/null
+++ b/wheel_artifacts/setup.cfg.base
@@ -0,0 +1,52 @@
+[metadata]
+name = {name}
+version = {version}
+description = {description}
+url = https://www.pyside.org
+download_url = https://download.qt.io/official_releases/QtForPython
+license = LGPL
+keywords = Qt
+author = Qt for Python Team
+author_email = pyside@qt-project.org
+long_description = file: {long_description}
+long_description_content_type = text/markdown
+ext_modules = None
+projects_urls =
+ Bug Tracker = https://bugreports.qt.io
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Environment :: Console
+ Environment :: MacOS X
+ Environment :: X11 Applications :: Qt
+ Environment :: Win32 (MS Windows)
+ Intended Audience :: Developers
+ License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
+ License :: Other/Proprietary License
+ Operating System :: MacOS :: MacOS X
+ Operating System :: POSIX
+ Operating System :: POSIX :: Linux
+ Operating System :: Microsoft
+ Operating System :: Microsoft :: Windows
+ Programming Language :: C++
+ Programming Language :: Python
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ Programming Language :: Python :: 3.10
+ Topic :: Database
+ Topic :: Software Development
+ Topic :: Software Development :: Code Generators
+ Topic :: Software Development :: Libraries :: Application Frameworks
+ Topic :: Software Development :: User Interfaces
+ Topic :: Software Development :: Widget Sets
+
+[options]
+packages = find:
+python_requires = >=3.6, <3.11
+include_package_data = True
+
+[bdist_wheel]
+py_limited_api = cp36
+plat_name = {tag}
diff --git a/wheel_artifacts/setup.py.base b/wheel_artifacts/setup.py.base
new file mode 100644
index 000000000..18634cbf8
--- /dev/null
+++ b/wheel_artifacts/setup.py.base
@@ -0,0 +1,29 @@
+import setuptools
+from setuptools import setup, Extension
+from setuptools._distutils import cmd
+
+# This class and Extension file is intended only to force setuptools
+# to understand we are using extension modules, but because we don't
+# include the source files in the 'Extension' object, it gets wrongly
+# lost.
+class build_ext(cmd.Command):
+ def initialize_options(self):
+ pass
+ def finalize_options(self):
+ pass
+ def run(self):
+ pass
+ def get_source_files(self):
+ return []
+ def get_requires_for_build_wheel(self):
+ pass
+
+setup_args = dict(
+ include_package_data=True,
+ packages = ["{name}"],
+ entry_points = {console_scripts},
+ ext_modules = [Extension("{fake_ext}", [], py_limited_api=True)],
+ install_requires={install},
+ cmdclass=dict([("build_ext", build_ext)]),
+)
+setup(**setup_args)