python3Packages.setuptools: 63.2.0 -> 65.3.0
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, python
|
||||
, bootstrapped-pip
|
||||
, lib
|
||||
@@ -11,7 +10,7 @@
|
||||
|
||||
let
|
||||
pname = "setuptools";
|
||||
version = "63.2.0";
|
||||
version = "65.3.0";
|
||||
|
||||
# Create an sdist of setuptools
|
||||
sdist = stdenv.mkDerivation rec {
|
||||
@@ -20,22 +19,14 @@ let
|
||||
src = fetchFromGitHub {
|
||||
owner = "pypa";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-GyQjc0XulUxl3Btpj7Q6KHTpd1FDZnXCYviYjjgK7tY=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-LPguGVWvwEMZpJFuXWLVFzIlzw+/QSMjVi2oYh0cI0s=";
|
||||
name = "${pname}-${version}-source";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./tag-date.patch
|
||||
./setuptools-distutils-C++.patch
|
||||
# Fix cross compilation of extension modules
|
||||
# https://github.com/pypa/distutils/pull/173
|
||||
(fetchpatch {
|
||||
url = "https://github.com/pypa/distutils/commit/22b9bcf2e2d2a66f7dc96661312972e2f6bd9e01.patch";
|
||||
hash = "sha256-IVb1LLgLIHO6HPn2911uksrLB1jG0MyQetdxkq5wcG4=";
|
||||
stripLen = 2;
|
||||
extraPrefix = "setuptools/_distutils/";
|
||||
})
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
@@ -86,5 +77,6 @@ in buildPythonPackage rec {
|
||||
license = with licenses; [ psfl zpl20 ];
|
||||
platforms = python.meta.platforms;
|
||||
priority = 10;
|
||||
maintainers = teams.python.members;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py
|
||||
index 445e2e51..2fdbdcca 100644
|
||||
index 2c4da5b5..e2cd8803 100644
|
||||
--- a/setuptools/_distutils/cygwinccompiler.py
|
||||
+++ b/setuptools/_distutils/cygwinccompiler.py
|
||||
@@ -131,14 +131,19 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
@@ -97,14 +97,19 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
self.cxx = os.environ.get('CXX', 'g++')
|
||||
|
||||
self.linker_dll = self.cc
|
||||
@@ -15,14 +15,14 @@ index 445e2e51..2fdbdcca 100644
|
||||
compiler_cxx='%s -mcygwin -O -Wall' % self.cxx,
|
||||
+ compiler_so_cxx='%s -mcygwin -mdll -O -Wall' % self.cxx,
|
||||
linker_exe='%s -mcygwin' % self.cc,
|
||||
linker_so=('%s -mcygwin %s' % (self.linker_dll, shared_option)),
|
||||
linker_so=('{} -mcygwin {}'.format(self.linker_dll, shared_option)),
|
||||
+ linker_exe_cxx='%s -mcygwin' % self.cxx,
|
||||
+ linker_so_cxx=('%s -mcygwin %s' %
|
||||
+ (self.linker_dll_cxx, shared_option)),
|
||||
)
|
||||
|
||||
# Include the appropriate MSVC runtime library if Python was built
|
||||
@@ -170,9 +175,12 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
@@ -136,9 +141,12 @@ class CygwinCCompiler(UnixCCompiler):
|
||||
raise CompileError(msg)
|
||||
else: # for other files use the C-compiler
|
||||
try:
|
||||
@@ -38,24 +38,24 @@ index 445e2e51..2fdbdcca 100644
|
||||
except DistutilsExecError as msg:
|
||||
raise CompileError(msg)
|
||||
|
||||
@@ -323,9 +331,12 @@ class Mingw32CCompiler(CygwinCCompiler):
|
||||
@@ -275,9 +283,12 @@ class Mingw32CCompiler(CygwinCCompiler):
|
||||
self.set_executables(
|
||||
compiler='%s -O -Wall' % self.cc,
|
||||
compiler_so='%s -mdll -O -Wall' % self.cc,
|
||||
+ compiler_so_cxx='%s -mdll -O -Wall' % self.cxx,
|
||||
compiler_cxx='%s -O -Wall' % self.cxx,
|
||||
linker_exe='%s' % self.cc,
|
||||
linker_so='%s %s' % (self.linker_dll, shared_option),
|
||||
linker_so='{} {}'.format(self.linker_dll, shared_option),
|
||||
+ linker_exe_cxx='%s' % self.cxx,
|
||||
+ linker_so_cxx='%s %s' % (self.linker_dll_cxx, shared_option)
|
||||
)
|
||||
|
||||
# Maybe we should also append -mthreads, but then the finished
|
||||
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
|
||||
index e41d51ee..f7ded14b 100644
|
||||
index 3dd8185f..cb374a94 100644
|
||||
--- a/setuptools/_distutils/sysconfig.py
|
||||
+++ b/setuptools/_distutils/sysconfig.py
|
||||
@@ -280,6 +280,7 @@ def customize_compiler(compiler):
|
||||
@@ -289,6 +289,7 @@ def customize_compiler(compiler): # noqa: C901
|
||||
cflags,
|
||||
ccshared,
|
||||
ldshared,
|
||||
@@ -63,7 +63,7 @@ index e41d51ee..f7ded14b 100644
|
||||
shlib_suffix,
|
||||
ar,
|
||||
ar_flags,
|
||||
@@ -289,11 +290,14 @@ def customize_compiler(compiler):
|
||||
@@ -298,11 +299,14 @@ def customize_compiler(compiler): # noqa: C901
|
||||
'CFLAGS',
|
||||
'CCSHARED',
|
||||
'LDSHARED',
|
||||
@@ -78,7 +78,7 @@ index e41d51ee..f7ded14b 100644
|
||||
if 'CC' in os.environ:
|
||||
newcc = os.environ['CC']
|
||||
if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
|
||||
@@ -305,19 +309,27 @@ def customize_compiler(compiler):
|
||||
@@ -314,19 +318,27 @@ def customize_compiler(compiler): # noqa: C901
|
||||
cxx = os.environ['CXX']
|
||||
if 'LDSHARED' in os.environ:
|
||||
ldshared = os.environ['LDSHARED']
|
||||
@@ -107,7 +107,7 @@ index e41d51ee..f7ded14b 100644
|
||||
if 'AR' in os.environ:
|
||||
ar = os.environ['AR']
|
||||
if 'ARFLAGS' in os.environ:
|
||||
@@ -326,13 +338,17 @@ def customize_compiler(compiler):
|
||||
@@ -335,13 +347,17 @@ def customize_compiler(compiler): # noqa: C901
|
||||
archiver = ar + ' ' + ar_flags
|
||||
|
||||
cc_cmd = cc + ' ' + cflags
|
||||
@@ -127,10 +127,10 @@ index e41d51ee..f7ded14b 100644
|
||||
)
|
||||
|
||||
diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py
|
||||
index 4be74fdf..66f95aef 100644
|
||||
index 4ab771a4..17abac83 100644
|
||||
--- a/setuptools/_distutils/unixccompiler.py
|
||||
+++ b/setuptools/_distutils/unixccompiler.py
|
||||
@@ -112,9 +112,12 @@ class UnixCCompiler(CCompiler):
|
||||
@@ -116,9 +116,12 @@ class UnixCCompiler(CCompiler):
|
||||
'preprocessor': None,
|
||||
'compiler': ["cc"],
|
||||
'compiler_so': ["cc"],
|
||||
@@ -144,7 +144,7 @@ index 4be74fdf..66f95aef 100644
|
||||
'archiver': ["ar", "-cr"],
|
||||
'ranlib': None,
|
||||
}
|
||||
@@ -174,8 +177,13 @@ class UnixCCompiler(CCompiler):
|
||||
@@ -182,8 +185,13 @@ class UnixCCompiler(CCompiler):
|
||||
|
||||
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
|
||||
compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
|
||||
@@ -159,7 +159,7 @@ index 4be74fdf..66f95aef 100644
|
||||
except DistutilsExecError as msg:
|
||||
raise CompileError(msg)
|
||||
|
||||
@@ -243,7 +251,8 @@ class UnixCCompiler(CCompiler):
|
||||
@@ -251,7 +259,8 @@ class UnixCCompiler(CCompiler):
|
||||
# building an executable or linker_so (with shared options)
|
||||
# when building a shared library.
|
||||
building_exe = target_desc == CCompiler.EXECUTABLE
|
||||
|
||||
Reference in New Issue
Block a user