mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 12:53:54 +00:00
python3Packages.setuptools: 60.8.2 -> 61.2.0
This commit is contained in:
parent
02fe739a47
commit
ba918de429
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
pname = "setuptools";
|
pname = "setuptools";
|
||||||
version = "60.8.2";
|
version = "61.2.0";
|
||||||
|
|
||||||
# Create an sdist of setuptools
|
# Create an sdist of setuptools
|
||||||
sdist = stdenv.mkDerivation rec {
|
sdist = stdenv.mkDerivation rec {
|
||||||
@ -20,7 +20,7 @@ let
|
|||||||
owner = "pypa";
|
owner = "pypa";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1mqpmbn58rx3g24dm6wnllx0xs97ampn2yga3qypqgwnh1nk477i";
|
hash = "sha256-Cgz3uA8U7A1lOZNuj1EYZVViZ3aL6VjcAno8GYQUufk=";
|
||||||
name = "${pname}-${version}-source";
|
name = "${pname}-${version}-source";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
Based on pkgs/development/interpreters/python/cpython/3.7/python-3.x-distutils-C++.patch,
|
|
||||||
adapted to apply to setuptools 60.x's bundled distutils.
|
|
||||||
|
|
||||||
diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py
|
diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py
|
||||||
index c5c86d8f..b879e447 100644
|
index c5c86d8f..b879e447 100644
|
||||||
--- a/setuptools/_distutils/cygwinccompiler.py
|
--- a/setuptools/_distutils/cygwinccompiler.py
|
||||||
@ -57,7 +54,7 @@ index c5c86d8f..b879e447 100644
|
|||||||
# Maybe we should also append -mthreads, but then the finished
|
# Maybe we should also append -mthreads, but then the finished
|
||||||
# dlls need another dll (mingwm10.dll see Mingw32 docs)
|
# dlls need another dll (mingwm10.dll see Mingw32 docs)
|
||||||
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
|
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
|
||||||
index 4a77a431..1ad85181 100644
|
index 9fad3835..889e2595 100644
|
||||||
--- a/setuptools/_distutils/sysconfig.py
|
--- a/setuptools/_distutils/sysconfig.py
|
||||||
+++ b/setuptools/_distutils/sysconfig.py
|
+++ b/setuptools/_distutils/sysconfig.py
|
||||||
@@ -216,9 +216,11 @@ def customize_compiler(compiler):
|
@@ -216,9 +216,11 @@ def customize_compiler(compiler):
|
||||||
@ -124,10 +121,10 @@ index 4a77a431..1ad85181 100644
|
|||||||
|
|
||||||
if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
|
if 'RANLIB' in os.environ and compiler.executables.get('ranlib', None):
|
||||||
diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py
|
diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py
|
||||||
index a07e5988..576ef490 100644
|
index 715408f5..6125a1eb 100644
|
||||||
--- a/setuptools/_distutils/unixccompiler.py
|
--- a/setuptools/_distutils/unixccompiler.py
|
||||||
+++ b/setuptools/_distutils/unixccompiler.py
|
+++ b/setuptools/_distutils/unixccompiler.py
|
||||||
@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler):
|
@@ -110,14 +110,17 @@ class UnixCCompiler(CCompiler):
|
||||||
# are pretty generic; they will probably have to be set by an outsider
|
# are pretty generic; they will probably have to be set by an outsider
|
||||||
# (eg. using information discovered by the sysconfig about building
|
# (eg. using information discovered by the sysconfig about building
|
||||||
# Python extensions).
|
# Python extensions).
|
||||||
@ -153,16 +150,12 @@ index a07e5988..576ef490 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
if sys.platform[:6] == "darwin":
|
if sys.platform[:6] == "darwin":
|
||||||
@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler):
|
@@ -169,9 +172,15 @@ class UnixCCompiler(CCompiler):
|
||||||
|
|
||||||
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
|
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
|
||||||
compiler_so = self.compiler_so
|
compiler_so = compiler_fixup(
|
||||||
+ compiler_so_cxx = self.compiler_so_cxx
|
self.compiler_so, cc_args + extra_postargs)
|
||||||
if sys.platform == 'darwin':
|
+ compiler_so_cxx = compiler_fixup(
|
||||||
compiler_so = _osx_support.compiler_fixup(compiler_so,
|
+ self.compiler_so_cxx, cc_args + extra_postargs)
|
||||||
cc_args + extra_postargs)
|
|
||||||
+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
|
|
||||||
+ cc_args + extra_postargs)
|
|
||||||
try:
|
try:
|
||||||
- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
|
- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
|
||||||
- extra_postargs)
|
- extra_postargs)
|
||||||
@ -175,42 +168,13 @@ index a07e5988..576ef490 100644
|
|||||||
except DistutilsExecError as msg:
|
except DistutilsExecError as msg:
|
||||||
raise CompileError(msg)
|
raise CompileError(msg)
|
||||||
|
|
||||||
@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler):
|
@@ -233,7 +242,8 @@ class UnixCCompiler(CCompiler):
|
||||||
ld_args.extend(extra_postargs)
|
# building an executable or linker_so (with shared options)
|
||||||
self.mkpath(os.path.dirname(output_filename))
|
# when building a shared library.
|
||||||
try:
|
building_exe = target_desc == CCompiler.EXECUTABLE
|
||||||
- if target_desc == CCompiler.EXECUTABLE:
|
- linker = (self.linker_exe if building_exe else self.linker_so)[:]
|
||||||
- linker = self.linker_exe[:]
|
+ linker = (self.linker_exe if building_exe else (self.linker_so_cxx if
|
||||||
+ if target_lang == "c++":
|
+ target_lang == "c++" else self.linker_so))[:]
|
||||||
+ if target_desc == CCompiler.EXECUTABLE:
|
|
||||||
+ linker = self.linker_exe_cxx[:]
|
|
||||||
+ else:
|
|
||||||
+ linker = self.linker_so_cxx[:]
|
|
||||||
else:
|
|
||||||
- linker = self.linker_so[:]
|
|
||||||
- if target_lang == "c++" and self.compiler_cxx:
|
|
||||||
- # skip over environment variable settings if /usr/bin/env
|
|
||||||
- # is used to set up the linker's environment.
|
|
||||||
- # This is needed on OSX. Note: this assumes that the
|
|
||||||
- # normal and C++ compiler have the same environment
|
|
||||||
- # settings.
|
|
||||||
- i = 0
|
|
||||||
- if os.path.basename(linker[0]) == "env":
|
|
||||||
- i = 1
|
|
||||||
- while '=' in linker[i]:
|
|
||||||
- i += 1
|
|
||||||
-
|
|
||||||
- if os.path.basename(linker[i]) == 'ld_so_aix':
|
|
||||||
- # AIX platforms prefix the compiler with the ld_so_aix
|
|
||||||
- # script, so we need to adjust our linker index
|
|
||||||
- offset = 1
|
|
||||||
+ if target_desc == CCompiler.EXECUTABLE:
|
|
||||||
+ linker = self.linker_exe[:]
|
|
||||||
else:
|
|
||||||
- offset = 0
|
|
||||||
-
|
|
||||||
- linker[i+offset] = self.compiler_cxx[i]
|
|
||||||
+ linker = self.linker_so[:]
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if target_lang == "c++" and self.compiler_cxx:
|
||||||
linker = _osx_support.compiler_fixup(linker, ld_args)
|
env, linker_ne = _split_env(linker)
|
||||||
|
Loading…
Reference in New Issue
Block a user