tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.setuptools: 63.2.0 -> 65.3.0
Martin Weinelt
3 years ago
f3b29870
dcd21563
+19
-27
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
setuptools
default.nix
setuptools-distutils-C++.patch
+4
-12
pkgs/development/python-modules/setuptools/default.nix
reviewed
···
1
1
{ stdenv
2
2
, buildPythonPackage
3
3
, fetchFromGitHub
4
4
-
, fetchpatch
5
4
, python
6
5
, bootstrapped-pip
7
6
, lib
···
11
10
12
11
let
13
12
pname = "setuptools";
14
14
-
version = "63.2.0";
13
13
+
version = "65.3.0";
15
14
16
15
# Create an sdist of setuptools
17
16
sdist = stdenv.mkDerivation rec {
···
20
19
src = fetchFromGitHub {
21
20
owner = "pypa";
22
21
repo = pname;
23
23
-
rev = "v${version}";
24
24
-
hash = "sha256-GyQjc0XulUxl3Btpj7Q6KHTpd1FDZnXCYviYjjgK7tY=";
22
22
+
rev = "refs/tags/v${version}";
23
23
+
hash = "sha256-LPguGVWvwEMZpJFuXWLVFzIlzw+/QSMjVi2oYh0cI0s=";
25
24
name = "${pname}-${version}-source";
26
25
};
27
26
28
27
patches = [
29
28
./tag-date.patch
30
29
./setuptools-distutils-C++.patch
31
31
-
# Fix cross compilation of extension modules
32
32
-
# https://github.com/pypa/distutils/pull/173
33
33
-
(fetchpatch {
34
34
-
url = "https://github.com/pypa/distutils/commit/22b9bcf2e2d2a66f7dc96661312972e2f6bd9e01.patch";
35
35
-
hash = "sha256-IVb1LLgLIHO6HPn2911uksrLB1jG0MyQetdxkq5wcG4=";
36
36
-
stripLen = 2;
37
37
-
extraPrefix = "setuptools/_distutils/";
38
38
-
})
39
30
];
40
31
41
32
buildPhase = ''
···
86
77
license = with licenses; [ psfl zpl20 ];
87
78
platforms = python.meta.platforms;
88
79
priority = 10;
80
80
+
maintainers = teams.python.members;
89
81
};
90
82
}
+15
-15
pkgs/development/python-modules/setuptools/setuptools-distutils-C++.patch
reviewed
···
1
1
diff --git a/setuptools/_distutils/cygwinccompiler.py b/setuptools/_distutils/cygwinccompiler.py
2
2
-
index 445e2e51..2fdbdcca 100644
2
2
+
index 2c4da5b5..e2cd8803 100644
3
3
--- a/setuptools/_distutils/cygwinccompiler.py
4
4
+++ b/setuptools/_distutils/cygwinccompiler.py
5
5
-
@@ -131,14 +131,19 @@ class CygwinCCompiler(UnixCCompiler):
5
5
+
@@ -97,14 +97,19 @@ class CygwinCCompiler(UnixCCompiler):
6
6
self.cxx = os.environ.get('CXX', 'g++')
7
7
8
8
self.linker_dll = self.cc
···
15
15
compiler_cxx='%s -mcygwin -O -Wall' % self.cxx,
16
16
+ compiler_so_cxx='%s -mcygwin -mdll -O -Wall' % self.cxx,
17
17
linker_exe='%s -mcygwin' % self.cc,
18
18
-
linker_so=('%s -mcygwin %s' % (self.linker_dll, shared_option)),
18
18
+
linker_so=('{} -mcygwin {}'.format(self.linker_dll, shared_option)),
19
19
+ linker_exe_cxx='%s -mcygwin' % self.cxx,
20
20
+ linker_so_cxx=('%s -mcygwin %s' %
21
21
+ (self.linker_dll_cxx, shared_option)),
22
22
)
23
23
24
24
# Include the appropriate MSVC runtime library if Python was built
25
25
-
@@ -170,9 +175,12 @@ class CygwinCCompiler(UnixCCompiler):
25
25
+
@@ -136,9 +141,12 @@ class CygwinCCompiler(UnixCCompiler):
26
26
raise CompileError(msg)
27
27
else: # for other files use the C-compiler
28
28
try:
···
38
38
except DistutilsExecError as msg:
39
39
raise CompileError(msg)
40
40
41
41
-
@@ -323,9 +331,12 @@ class Mingw32CCompiler(CygwinCCompiler):
41
41
+
@@ -275,9 +283,12 @@ class Mingw32CCompiler(CygwinCCompiler):
42
42
self.set_executables(
43
43
compiler='%s -O -Wall' % self.cc,
44
44
compiler_so='%s -mdll -O -Wall' % self.cc,
45
45
+ compiler_so_cxx='%s -mdll -O -Wall' % self.cxx,
46
46
compiler_cxx='%s -O -Wall' % self.cxx,
47
47
linker_exe='%s' % self.cc,
48
48
-
linker_so='%s %s' % (self.linker_dll, shared_option),
48
48
+
linker_so='{} {}'.format(self.linker_dll, shared_option),
49
49
+ linker_exe_cxx='%s' % self.cxx,
50
50
+ linker_so_cxx='%s %s' % (self.linker_dll_cxx, shared_option)
51
51
)
52
52
53
53
# Maybe we should also append -mthreads, but then the finished
54
54
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
55
55
-
index e41d51ee..f7ded14b 100644
55
55
+
index 3dd8185f..cb374a94 100644
56
56
--- a/setuptools/_distutils/sysconfig.py
57
57
+++ b/setuptools/_distutils/sysconfig.py
58
58
-
@@ -280,6 +280,7 @@ def customize_compiler(compiler):
58
58
+
@@ -289,6 +289,7 @@ def customize_compiler(compiler): # noqa: C901
59
59
cflags,
60
60
ccshared,
61
61
ldshared,
···
63
63
shlib_suffix,
64
64
ar,
65
65
ar_flags,
66
66
-
@@ -289,11 +290,14 @@ def customize_compiler(compiler):
66
66
+
@@ -298,11 +299,14 @@ def customize_compiler(compiler): # noqa: C901
67
67
'CFLAGS',
68
68
'CCSHARED',
69
69
'LDSHARED',
···
78
78
if 'CC' in os.environ:
79
79
newcc = os.environ['CC']
80
80
if 'LDSHARED' not in os.environ and ldshared.startswith(cc):
81
81
-
@@ -305,19 +309,27 @@ def customize_compiler(compiler):
81
81
+
@@ -314,19 +318,27 @@ def customize_compiler(compiler): # noqa: C901
82
82
cxx = os.environ['CXX']
83
83
if 'LDSHARED' in os.environ:
84
84
ldshared = os.environ['LDSHARED']
···
107
107
if 'AR' in os.environ:
108
108
ar = os.environ['AR']
109
109
if 'ARFLAGS' in os.environ:
110
110
-
@@ -326,13 +338,17 @@ def customize_compiler(compiler):
110
110
+
@@ -335,13 +347,17 @@ def customize_compiler(compiler): # noqa: C901
111
111
archiver = ar + ' ' + ar_flags
112
112
113
113
cc_cmd = cc + ' ' + cflags
···
127
127
)
128
128
129
129
diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py
130
130
-
index 4be74fdf..66f95aef 100644
130
130
+
index 4ab771a4..17abac83 100644
131
131
--- a/setuptools/_distutils/unixccompiler.py
132
132
+++ b/setuptools/_distutils/unixccompiler.py
133
133
-
@@ -112,9 +112,12 @@ class UnixCCompiler(CCompiler):
133
133
+
@@ -116,9 +116,12 @@ class UnixCCompiler(CCompiler):
134
134
'preprocessor': None,
135
135
'compiler': ["cc"],
136
136
'compiler_so': ["cc"],
···
144
144
'archiver': ["ar", "-cr"],
145
145
'ranlib': None,
146
146
}
147
147
-
@@ -174,8 +177,13 @@ class UnixCCompiler(CCompiler):
147
147
+
@@ -182,8 +185,13 @@ class UnixCCompiler(CCompiler):
148
148
149
149
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
150
150
compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs)
···
159
159
except DistutilsExecError as msg:
160
160
raise CompileError(msg)
161
161
162
162
-
@@ -243,7 +251,8 @@ class UnixCCompiler(CCompiler):
162
162
+
@@ -251,7 +259,8 @@ class UnixCCompiler(CCompiler):
163
163
# building an executable or linker_so (with shared options)
164
164
# when building a shared library.
165
165
building_exe = target_desc == CCompiler.EXECUTABLE