aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.py
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2023-06-08 16:59:50 +0200
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2023-07-14 10:36:12 +0200
commit709c3f0b8a7a597e531506d6024ead26b3a8f08a (patch)
treef0504226484503f65efed5101d9c98b304f7cb7f /build_scripts/main.py
parent4b12b8f558eb52625a458703698030090ae8d50f (diff)
build: remove traces of distutils
Removed mentions, comments, and fallback usages in some sections of the build scripts and documentation. On the CI, we upgrade setuptools in order to avoid having missing functionality, so it shouldn't be an issue. For Shiboken and CMake, there is still a helper that relies on distutils in case people is using python < 3.8.2 Pick-to: 6.5 Change-Id: Ic33abe9fa8bd8564e9d44c8714b7fedd4e50434a Reviewed-by: Simo Fält <simo.falt@qt.io>
Diffstat (limited to 'build_scripts/main.py')
-rw-r--r--build_scripts/main.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 1de282a29..8378b882c 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -14,7 +14,6 @@ from shutil import copytree
from textwrap import dedent
# PYSIDE-1760: Pre-load setuptools modules early to avoid racing conditions.
-# Please be careful: All setuptools modules must be loaded before _distutils
# may be touched (should be avoided anyway, btw.)
# Note: This bug is only visible when tools like pyenv are not used. They have some
# pre-loading effect so that setuptools is already in the cache, hiding the problem.
@@ -179,12 +178,12 @@ class PysideInstall(_install, CommandMixin):
if sys.platform == 'darwin' or self.is_cross_compile:
# Because we change the plat_name to include a correct
- # deployment target on macOS distutils thinks we are
+ # deployment target on macOS setuptools thinks we are
# cross-compiling, and throws an exception when trying to
# execute setup.py install. The check looks like this
# if self.warn_dir and build_plat != get_platform():
- # raise DistutilsPlatformError("Can't install when "
- # "cross-compiling")
+ # raise PlatformError("Can't install when "
+ # "cross-compiling")
# Obviously get_platform will return the old deployment
# target. The fix is to disable the warn_dir flag, which
# was created for bdist_* derived classes to override, for
@@ -236,7 +235,7 @@ class PysideBuildPy(_build_py):
# _install_lib is reimplemented to preserve
-# symlinks when distutils / setuptools copy files to various
+# symlinks when setuptools copy files to various
# directories from the setup tools build dir to the install dir.
class PysideInstallLib(_install_lib):
@@ -283,7 +282,7 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
if use_os_name_hack:
# This is a hack to circumvent the dubious check in
- # distutils.commands.build -> finalize_options, which only
+ # setuptool.commands.build -> finalize_options, which only
# allows setting the plat_name for windows NT.
# That is not the case for the wheel module though (which
# does allow setting plat_name), so we circumvent by faking
@@ -772,7 +771,7 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
# Set macOS minimum deployment target (version).
# This is required so that calling
- # run_process -> distutils.spawn()
+ # run_process -> subprocess.call()
# does not set its own minimum deployment target
# environment variable which is based on the python
# interpreter sysconfig value.
@@ -887,7 +886,7 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
def prepare_packages(self):
"""
This will copy all relevant files from the various locations in the "cmake install dir",
- to the setup tools build dir (which is read from self.build_lib provided by distutils).
+ to the setup tools build dir (which is read from self.build_lib provided by setuptools).
After that setuptools.command.build_py is smart enough to copy everything
from the build dir to the install dir (the virtualenv site-packages for example).