This commit is contained in:
ton
2024-10-07 10:13:40 +07:00
parent aa1631742f
commit 3a7d696db6
9729 changed files with 1832837 additions and 161742 deletions

View File

@@ -2,8 +2,10 @@
Implements the Distutils 'build' command."""
import sys
import os
import sys
import sysconfig
from ..core import Command
from ..errors import DistutilsOptionError
from ..util import get_platform
@@ -25,16 +27,14 @@ class build(Command):
(
'build-lib=',
None,
"build directory for all distribution (defaults to either "
+ "build-purelib or build-platlib",
"build directory for all distribution (defaults to either build-purelib or build-platlib",
),
('build-scripts=', None, "build directory for scripts"),
('build-temp=', 't', "temporary build directory"),
(
'plat-name=',
'p',
"platform name to build for, if supported "
"(default: %s)" % get_platform(),
f"platform name to build for, if supported [default: {get_platform()}]",
),
('compiler=', 'c', "specify the compiler type"),
('parallel=', 'j', "number of parallel build jobs"),
@@ -61,7 +61,7 @@ class build(Command):
self.compiler = None
self.plat_name = None
self.debug = None
self.force = 0
self.force = False
self.executable = None
self.parallel = None
@@ -78,7 +78,11 @@ class build(Command):
"using './configure --help' on your platform)"
)
plat_specifier = ".{}-{}".format(self.plat_name, sys.implementation.cache_tag)
plat_specifier = f".{self.plat_name}-{sys.implementation.cache_tag}"
# Python 3.13+ with --disable-gil shouldn't share build directories
if sysconfig.get_config_var('Py_GIL_DISABLED'):
plat_specifier += 't'
# Make it so Python 2.x and Python 2.x with --with-pydebug don't
# share the same build directories. Doing so confuses the build