Python-3.9.7
This commit is contained in:
+5
-5
@@ -1,7 +1,7 @@
|
||||
From cb8a5266fd6cef5f523f64f95905d684766c68de Mon Sep 17 00:00:00 2001
|
||||
From c7d26e6881e6d305a9e2cb095b540a9062f84272 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Fri, 5 Jan 2018 13:28:45 -0500
|
||||
Subject: [PATCH 01/16] Install libpythonX.Y.a in /usr/lib instead of
|
||||
Subject: [PATCH 01/14] Install libpythonX.Y.a in /usr/lib instead of
|
||||
/usr/lib/pythonX.Y/config
|
||||
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=252372
|
||||
@@ -14,10 +14,10 @@ https://bugs.python.org/issue6103
|
||||
4 files changed, 4 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 7e381283fe..37cbb02890 100644
|
||||
index 6ce7a614dc..27666e9d16 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1582,9 +1582,9 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
@@ -1655,9 +1655,9 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
@if test -d $(LIBRARY); then :; else \
|
||||
if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
|
||||
if test "$(SHLIB_SUFFIX)" = .dll; then \
|
||||
@@ -30,7 +30,7 @@ index 7e381283fe..37cbb02890 100644
|
||||
else \
|
||||
echo Skip install of $(LIBRARY) - use make frameworkinstall; \
|
||||
diff --git a/Misc/python-config.in b/Misc/python-config.in
|
||||
index 727c4a8682..bab60cf2d1 100644
|
||||
index ebd99daa0c..ddcb9e0154 100644
|
||||
--- a/Misc/python-config.in
|
||||
+++ b/Misc/python-config.in
|
||||
@@ -56,12 +56,6 @@ for opt in opt_flags:
|
||||
|
||||
+14
-14
@@ -1,38 +1,38 @@
|
||||
From dbb695267eb05999d2af3ce85200c3ebdf53b1e5 Mon Sep 17 00:00:00 2001
|
||||
From da4a87387b4589313003a7bc73832ee6d19f74c4 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Fri, 5 Jan 2018 13:32:45 -0500
|
||||
Subject: [PATCH 04/16] setup.py: exit with non-zero status on failure
|
||||
Subject: [PATCH 04/14] setup.py: exit with non-zero status on failure
|
||||
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=281968
|
||||
https://bugs.python.org/issue6731
|
||||
---
|
||||
setup.py | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
setup.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 53591bc1e6..2b362029ac 100644
|
||||
index e5a3f1aff8..15dd1c4ad4 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -86,6 +86,7 @@ Programming Language :: Python
|
||||
@@ -105,6 +105,7 @@ Programming Language :: Python
|
||||
Topic :: Software Development
|
||||
"""
|
||||
|
||||
+exit_status = 0
|
||||
|
||||
# Set common compiler and linker flags derived from the Makefile,
|
||||
# reserved for building the interpreter and the stdlib modules.
|
||||
@@ -430,7 +431,10 @@ class PyBuildExt(build_ext):
|
||||
print_three_column([ext.name for ext in mods_disabled])
|
||||
def run_command(cmd):
|
||||
status = os.system(cmd)
|
||||
@@ -524,8 +525,10 @@ class PyBuildExt(build_ext):
|
||||
print("been built, they are *disabled* by configure:")
|
||||
print_three_column(self.disabled_configure)
|
||||
print()
|
||||
|
||||
+ global exit_status
|
||||
+
|
||||
|
||||
if self.failed:
|
||||
+ exit_status = 1
|
||||
failed = self.failed[:]
|
||||
print()
|
||||
print("Failed to build these modules:")
|
||||
@@ -438,6 +442,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -533,6 +536,7 @@ class PyBuildExt(build_ext):
|
||||
print()
|
||||
|
||||
if self.failed_on_import:
|
||||
@@ -40,7 +40,7 @@ index 53591bc1e6..2b362029ac 100644
|
||||
failed = self.failed_on_import[:]
|
||||
print()
|
||||
print("Following modules built successfully"
|
||||
@@ -2415,6 +2420,7 @@ def main():
|
||||
@@ -2603,6 +2607,7 @@ def main():
|
||||
scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
|
||||
"Tools/scripts/2to3"]
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5082bf6ec57eed8680eac679f6c3e6908031b3f7 Mon Sep 17 00:00:00 2001
|
||||
From a6d965d846dd989bfd9bcfa806575cadf5643656 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Fri, 5 Jan 2018 13:34:21 -0500
|
||||
Subject: [PATCH 05/16] Improve distutils C++ support
|
||||
Subject: [PATCH 05/14] Improve distutils C++ support
|
||||
|
||||
https://bugs.python.org/issue1222585
|
||||
---
|
||||
@@ -14,7 +14,7 @@ https://bugs.python.org/issue1222585
|
||||
6 files changed, 80 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
|
||||
index 9b127c2491..b13734a271 100644
|
||||
index 37975fe8a3..b4e46df29c 100644
|
||||
--- a/Lib/_osx_support.py
|
||||
+++ b/Lib/_osx_support.py
|
||||
@@ -14,13 +14,13 @@ __all__ = [
|
||||
@@ -35,10 +35,10 @@ index 9b127c2491..b13734a271 100644
|
||||
# prefix added to original configuration variable names
|
||||
_INITPRE = '_OSX_SUPPORT_INITIAL_'
|
||||
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
|
||||
index 6c5d77746b..640fa2da34 100644
|
||||
index 66c12dd358..dddb9fd2d4 100644
|
||||
--- a/Lib/distutils/cygwinccompiler.py
|
||||
+++ b/Lib/distutils/cygwinccompiler.py
|
||||
@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
@@ -123,8 +123,10 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
# dllwrap 2.10.90 is buggy
|
||||
if self.ld_version >= "2.10.90":
|
||||
self.linker_dll = "gcc"
|
||||
@@ -49,7 +49,7 @@ index 6c5d77746b..640fa2da34 100644
|
||||
|
||||
# ld_version >= "2.13" support -shared so use it instead of
|
||||
# -mdll -static
|
||||
@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
@@ -138,9 +140,13 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
self.set_executables(compiler='gcc -mcygwin -O -Wall',
|
||||
compiler_so='gcc -mcygwin -mdll -O -Wall',
|
||||
compiler_cxx='g++ -mcygwin -O -Wall',
|
||||
@@ -64,7 +64,7 @@ index 6c5d77746b..640fa2da34 100644
|
||||
|
||||
# cygwin and mingw32 need different sets of libraries
|
||||
if self.gcc_version == "2.91.57":
|
||||
@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
@@ -164,8 +170,12 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
raise CompileError(msg)
|
||||
else: # for other files use the C-compiler
|
||||
try:
|
||||
@@ -79,7 +79,7 @@ index 6c5d77746b..640fa2da34 100644
|
||||
except DistutilsExecError as msg:
|
||||
raise CompileError(msg)
|
||||
|
||||
@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler):
|
||||
@@ -300,9 +310,14 @@ class Mingw32CCompiler(CygwinCCompiler):
|
||||
self.set_executables(compiler='gcc -O -Wall',
|
||||
compiler_so='gcc -mdll -O -Wall',
|
||||
compiler_cxx='g++ -O -Wall',
|
||||
@@ -95,10 +95,10 @@ index 6c5d77746b..640fa2da34 100644
|
||||
# Maybe we should also append -mthreads, but then the finished
|
||||
# dlls need another dll (mingwm10.dll see Mingw32 docs)
|
||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index b51629eb94..c00870fb0f 100644
|
||||
index 37feae5df7..f78d01257a 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -187,9 +187,12 @@ def customize_compiler(compiler):
|
||||
@@ -193,9 +193,12 @@ def customize_compiler(compiler):
|
||||
_osx_support.customize_compiler(_config_vars)
|
||||
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
|
||||
|
||||
@@ -114,7 +114,7 @@ index b51629eb94..c00870fb0f 100644
|
||||
|
||||
if 'CC' in os.environ:
|
||||
newcc = os.environ['CC']
|
||||
@@ -204,19 +207,27 @@ def customize_compiler(compiler):
|
||||
@@ -210,19 +213,27 @@ def customize_compiler(compiler):
|
||||
cxx = os.environ['CXX']
|
||||
if 'LDSHARED' in os.environ:
|
||||
ldshared = os.environ['LDSHARED']
|
||||
@@ -143,7 +143,7 @@ index b51629eb94..c00870fb0f 100644
|
||||
if 'AR' in os.environ:
|
||||
ar = os.environ['AR']
|
||||
if 'ARFLAGS' in os.environ:
|
||||
@@ -225,13 +236,17 @@ def customize_compiler(compiler):
|
||||
@@ -231,13 +242,17 @@ def customize_compiler(compiler):
|
||||
archiver = ar + ' ' + ar_flags
|
||||
|
||||
cc_cmd = cc + ' ' + cflags
|
||||
@@ -312,10 +312,10 @@ index f0792de74a..16e7fbea83 100644
|
||||
if sys.platform == 'darwin':
|
||||
linker = _osx_support.compiler_fixup(linker, ld_args)
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 37cbb02890..3d724dfb51 100644
|
||||
index 27666e9d16..abdb4a096f 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -606,10 +606,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
||||
@@ -630,10 +630,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
||||
*\ -s*|s*) quiet="-q";; \
|
||||
*) quiet="";; \
|
||||
esac; \
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
From 91d3cec0fc9139817414a9d8af5ba29d22e2e751 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sun, 5 Jun 2016 08:18:01 +0200
|
||||
Subject: [PATCH 07/14] distutils: make -OO enable both opt-1 and opt-2
|
||||
optimization
|
||||
|
||||
Bug: http://bugs.python.org/issue27226
|
||||
Bug: https://bugs.gentoo.org/585060
|
||||
---
|
||||
Lib/distutils/command/build_py.py | 8 ++++----
|
||||
Lib/distutils/command/install_lib.py | 12 ++++++------
|
||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
|
||||
index edc2171cd1..e34749d6eb 100644
|
||||
--- a/Lib/distutils/command/build_py.py
|
||||
+++ b/Lib/distutils/command/build_py.py
|
||||
@@ -315,9 +315,9 @@ class build_py (Command):
|
||||
if self.compile:
|
||||
outputs.append(importlib.util.cache_from_source(
|
||||
filename, optimization=''))
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
outputs.append(importlib.util.cache_from_source(
|
||||
- filename, optimization=self.optimize))
|
||||
+ filename, optimization=opt))
|
||||
|
||||
outputs += [
|
||||
os.path.join(build_dir, filename)
|
||||
@@ -387,8 +387,8 @@ class build_py (Command):
|
||||
if self.compile:
|
||||
byte_compile(files, optimize=0,
|
||||
force=self.force, prefix=prefix, dry_run=self.dry_run)
|
||||
- if self.optimize > 0:
|
||||
- byte_compile(files, optimize=self.optimize,
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
+ byte_compile(files, optimize=opt,
|
||||
force=self.force, prefix=prefix, dry_run=self.dry_run)
|
||||
|
||||
class build_py_2to3(build_py, Mixin2to3):
|
||||
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
|
||||
index 6154cf0943..049b662566 100644
|
||||
--- a/Lib/distutils/command/install_lib.py
|
||||
+++ b/Lib/distutils/command/install_lib.py
|
||||
@@ -24,8 +24,8 @@ class install_lib(Command):
|
||||
# 2) compile .pyc only (--compile --no-optimize; default)
|
||||
# 3) compile .pyc and "opt-1" .pyc (--compile --optimize)
|
||||
# 4) compile "opt-1" .pyc only (--no-compile --optimize)
|
||||
- # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
|
||||
- # 6) compile "opt-2" .pyc only (--no-compile --optimize-more)
|
||||
+ # 5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
|
||||
+ # 6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
|
||||
#
|
||||
# The UI for this is two options, 'compile' and 'optimize'.
|
||||
# 'compile' is strictly boolean, and only decides whether to
|
||||
@@ -132,8 +132,8 @@ class install_lib(Command):
|
||||
byte_compile(files, optimize=0,
|
||||
force=self.force, prefix=install_root,
|
||||
dry_run=self.dry_run)
|
||||
- if self.optimize > 0:
|
||||
- byte_compile(files, optimize=self.optimize,
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
+ byte_compile(files, optimize=opt,
|
||||
force=self.force, prefix=install_root,
|
||||
verbose=self.verbose, dry_run=self.dry_run)
|
||||
|
||||
@@ -167,9 +167,9 @@ class install_lib(Command):
|
||||
if self.compile:
|
||||
bytecode_files.append(importlib.util.cache_from_source(
|
||||
py_file, optimization=''))
|
||||
- if self.optimize > 0:
|
||||
+ for opt in range(1, self.optimize + 1):
|
||||
bytecode_files.append(importlib.util.cache_from_source(
|
||||
- py_file, optimization=self.optimize))
|
||||
+ py_file, optimization=opt))
|
||||
|
||||
return bytecode_files
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Reference in New Issue
Block a user