Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 7c0e27f

Browse files
committed
3.4.2, merged improvments from PLD, updated Gentoo patches (http://dev.gentoo.org/~floppym/python)
1 parent 73916aa commit 7c0e27f

6 files changed

Lines changed: 258 additions & 172 deletions

python3-distutils-cxx.patch

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,66 @@
1-
http://bugs.python.org/issue1222585
1+
https://bugs.python.org/issue1222585
22

3+
--- Lib/distutils/cygwinccompiler.py
4+
+++ Lib/distutils/cygwinccompiler.py
5+
@@ -125,8 +125,10 @@
6+
# dllwrap 2.10.90 is buggy
7+
if self.ld_version >= "2.10.90":
8+
self.linker_dll = "gcc"
9+
+ self.linker_dll_cxx = "g++"
10+
else:
11+
self.linker_dll = "dllwrap"
12+
+ self.linker_dll_cxx = "dllwrap"
13+
14+
# ld_version >= "2.13" support -shared so use it instead of
15+
# -mdll -static
16+
@@ -140,9 +142,13 @@
17+
self.set_executables(compiler='gcc -mcygwin -O -Wall',
18+
compiler_so='gcc -mcygwin -mdll -O -Wall',
19+
compiler_cxx='g++ -mcygwin -O -Wall',
20+
+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
21+
linker_exe='gcc -mcygwin',
22+
linker_so=('%s -mcygwin %s' %
23+
- (self.linker_dll, shared_option)))
24+
+ (self.linker_dll, shared_option)),
25+
+ linker_exe_cxx='g++ -mcygwin',
26+
+ linker_so_cxx=('%s -mcygwin %s' %
27+
+ (self.linker_dll_cxx, shared_option)))
28+
29+
# cygwin and mingw32 need different sets of libraries
30+
if self.gcc_version == "2.91.57":
31+
@@ -166,8 +172,12 @@
32+
raise CompileError(msg)
33+
else: # for other files use the C-compiler
34+
try:
35+
- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
36+
- extra_postargs)
37+
+ if self.detect_language(src) == 'c++':
38+
+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
39+
+ extra_postargs)
40+
+ else:
41+
+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
42+
+ extra_postargs)
43+
except DistutilsExecError as msg:
44+
raise CompileError(msg)
45+
46+
@@ -302,9 +312,14 @@
47+
self.set_executables(compiler='gcc -O -Wall',
48+
compiler_so='gcc -mdll -O -Wall',
49+
compiler_cxx='g++ -O -Wall',
50+
+ compiler_so_cxx='g++ -mdll -O -Wall',
51+
linker_exe='gcc',
52+
linker_so='%s %s %s'
53+
% (self.linker_dll, shared_option,
54+
+ entry_point),
55+
+ linker_exe_cxx='g++',
56+
+ linker_so_cxx='%s %s %s'
57+
+ % (self.linker_dll_cxx, shared_option,
58+
entry_point))
59+
# Maybe we should also append -mthreads, but then the finished
60+
# dlls need another dll (mingwm10.dll see Mingw32 docs)
361
--- Lib/distutils/sysconfig.py
462
+++ Lib/distutils/sysconfig.py
5-
@@ -191,9 +191,12 @@
63+
@@ -182,9 +182,12 @@
664
_osx_support.customize_compiler(_config_vars)
765
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
866

@@ -18,7 +76,7 @@ http://bugs.python.org/issue1222585
1876

1977
if 'CC' in os.environ:
2078
newcc = os.environ['CC']
21-
@@ -208,19 +211,27 @@
79+
@@ -199,19 +202,27 @@
2280
cxx = os.environ['CXX']
2381
if 'LDSHARED' in os.environ:
2482
ldshared = os.environ['LDSHARED']
@@ -47,7 +105,7 @@ http://bugs.python.org/issue1222585
47105
if 'AR' in os.environ:
48106
ar = os.environ['AR']
49107
if 'ARFLAGS' in os.environ:
50-
@@ -229,13 +240,17 @@
108+
@@ -220,13 +231,17 @@
51109
archiver = ar + ' ' + ar_flags
52110

53111
cc_cmd = cc + ' ' + cflags
@@ -148,9 +206,30 @@ http://bugs.python.org/issue1222585
148206

149207
if sys.platform == 'darwin':
150208
linker = _osx_support.compiler_fixup(linker, ld_args)
209+
--- Lib/_osx_support.py
210+
+++ Lib/_osx_support.py
211+
@@ -14,13 +14,13 @@
212+
# configuration variables that may contain universal build flags,
213+
# like "-arch" or "-isdkroot", that may need customization for
214+
# the user environment
215+
-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
216+
- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
217+
- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
218+
- 'PY_CORE_CFLAGS')
219+
+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
220+
+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
221+
+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
222+
+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
223+
224+
# configuration variables that may contain compiler calls
225+
-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
226+
+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
227+
228+
# prefix added to original configuration variable names
229+
_INITPRE = '_OSX_SUPPORT_INITIAL_'
151230
--- Makefile.pre.in
152231
+++ Makefile.pre.in
153-
@@ -496,7 +496,7 @@
232+
@@ -568,7 +568,7 @@
154233
*\ -s*|s*) quiet="-q";; \
155234
*) quiet="";; \
156235
esac; \

python3-h2py-encoding.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
http://bugs.python.org/issue13032
1+
https://bugs.python.org/issue13032
22

33
--- Tools/scripts/h2py.py
44
+++ Tools/scripts/h2py.py

python3-lib64.patch

Lines changed: 49 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff -aurN Python-3.3.3.orig/Lib/distutils/command/install.py Python-3.3.3/Lib/distutils/command/install.py
2-
--- Python-3.3.3.orig/Lib/distutils/command/install.py 2013-11-25 12:44:06.518309086 +0100
3-
+++ Python-3.3.3/Lib/distutils/command/install.py 2013-11-25 12:44:53.863128105 +0100
4-
@@ -45,14 +45,14 @@
1+
diff -aurN Python-3.4.2.orig/Lib/distutils/command/install.py Python-3.4.2/Lib/distutils/command/install.py
2+
--- Python-3.4.2.orig/Lib/distutils/command/install.py 2014-10-08 10:18:12.000000000 +0200
3+
+++ Python-3.4.2/Lib/distutils/command/install.py 2015-01-05 16:52:21.639815163 +0100
4+
@@ -30,14 +30,14 @@
55
INSTALL_SCHEMES = {
66
'unix_prefix': {
77
'purelib': '$base/lib/python$py_version_short/site-packages',
@@ -18,10 +18,10 @@ diff -aurN Python-3.3.3.orig/Lib/distutils/command/install.py Python-3.3.3/Lib/d
1818
'headers': '$base/include/python/$dist_name',
1919
'scripts': '$base/bin',
2020
'data' : '$base',
21-
diff -aurN Python-3.3.3.orig/Lib/distutils/sysconfig.py Python-3.3.3/Lib/distutils/sysconfig.py
22-
--- Python-3.3.3.orig/Lib/distutils/sysconfig.py 2013-11-25 12:44:06.517309048 +0100
23-
+++ Python-3.3.3/Lib/distutils/sysconfig.py 2013-11-25 12:44:53.863128105 +0100
24-
@@ -143,8 +143,12 @@
21+
diff -aurN Python-3.4.2.orig/Lib/distutils/sysconfig.py Python-3.4.2/Lib/distutils/sysconfig.py
22+
--- Python-3.4.2.orig/Lib/distutils/sysconfig.py 2014-10-08 10:18:12.000000000 +0200
23+
+++ Python-3.4.2/Lib/distutils/sysconfig.py 2015-01-05 16:52:21.639815163 +0100
24+
@@ -141,8 +141,12 @@
2525
prefix = plat_specific and EXEC_PREFIX or PREFIX
2626

2727
if os.name == "posix":
@@ -35,13 +35,13 @@ diff -aurN Python-3.3.3.orig/Lib/distutils/sysconfig.py Python-3.3.3/Lib/distuti
3535
if standard_lib:
3636
return libpython
3737
else:
38-
diff -aurN Python-3.3.3.orig/Lib/site.py Python-3.3.3/Lib/site.py
39-
--- Python-3.3.3.orig/Lib/site.py 2013-11-25 12:44:06.514308933 +0100
40-
+++ Python-3.3.3/Lib/site.py 2013-11-25 12:44:53.864128142 +0100
41-
@@ -303,12 +303,16 @@
42-
if sys.platform in ('os2emx', 'riscos'):
43-
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
44-
elif os.sep == '/':
38+
diff -aurN Python-3.4.2.orig/Lib/site.py Python-3.4.2/Lib/site.py
39+
--- Python-3.4.2.orig/Lib/site.py 2014-10-08 10:18:12.000000000 +0200
40+
+++ Python-3.4.2/Lib/site.py 2015-01-05 16:53:55.603560456 +0100
41+
@@ -304,12 +304,16 @@
42+
seen.add(prefix)
43+
44+
if os.sep == '/':
4545
+ sitepackages.append(os.path.join(prefix, "lib64",
4646
+ "python" + sys.version[:3],
4747
+ "site-packages"))
@@ -55,10 +55,10 @@ diff -aurN Python-3.3.3.orig/Lib/site.py Python-3.3.3/Lib/site.py
5555
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
5656
if sys.platform == "darwin":
5757
# for framework builds *only* we add the standard Apple
58-
diff -aurN Python-3.3.3.orig/Lib/sysconfig.py Python-3.3.3/Lib/sysconfig.py
59-
--- Python-3.3.3.orig/Lib/sysconfig.py 2013-11-25 12:44:06.518309086 +0100
60-
+++ Python-3.3.3/Lib/sysconfig.py 2013-11-25 12:44:53.864128142 +0100
61-
@@ -21,10 +21,10 @@
58+
diff -aurN Python-3.4.2.orig/Lib/sysconfig.py Python-3.4.2/Lib/sysconfig.py
59+
--- Python-3.4.2.orig/Lib/sysconfig.py 2014-10-08 10:18:12.000000000 +0200
60+
+++ Python-3.4.2/Lib/sysconfig.py 2015-01-05 16:52:21.639815163 +0100
61+
@@ -20,10 +20,10 @@
6262

6363
_INSTALL_SCHEMES = {
6464
'posix_prefix': {
@@ -72,7 +72,7 @@ diff -aurN Python-3.3.3.orig/Lib/sysconfig.py Python-3.3.3/Lib/sysconfig.py
7272
'include':
7373
'{installed_base}/include/python{py_version_short}{abiflags}',
7474
'platinclude':
75-
@@ -33,10 +33,10 @@
75+
@@ -32,10 +32,10 @@
7676
'data': '{base}',
7777
},
7878
'posix_home': {
@@ -86,7 +86,7 @@ diff -aurN Python-3.3.3.orig/Lib/sysconfig.py Python-3.3.3/Lib/sysconfig.py
8686
'include': '{installed_base}/include/python',
8787
'platinclude': '{installed_base}/include/python',
8888
'scripts': '{base}/bin',
89-
@@ -81,10 +81,10 @@
89+
@@ -61,10 +61,10 @@
9090
'data': '{userbase}',
9191
},
9292
'posix_user': {
@@ -100,10 +100,10 @@ diff -aurN Python-3.3.3.orig/Lib/sysconfig.py Python-3.3.3/Lib/sysconfig.py
100100
'include': '{userbase}/include/python{py_version_short}',
101101
'scripts': '{userbase}/bin',
102102
'data': '{userbase}',
103-
diff -aurN Python-3.3.3.orig/Makefile.pre.in Python-3.3.3/Makefile.pre.in
104-
--- Python-3.3.3.orig/Makefile.pre.in 2013-11-25 12:44:06.493308126 +0100
105-
+++ Python-3.3.3/Makefile.pre.in 2013-11-25 12:44:53.864128142 +0100
106-
@@ -1183,7 +1183,7 @@
103+
diff -aurN Python-3.4.2.orig/Makefile.pre.in Python-3.4.2/Makefile.pre.in
104+
--- Python-3.4.2.orig/Makefile.pre.in 2014-10-08 10:18:14.000000000 +0200
105+
+++ Python-3.4.2/Makefile.pre.in 2015-01-05 16:52:21.639815163 +0100
106+
@@ -1310,7 +1310,7 @@
107107

108108
# Install the library and miscellaneous stuff needed for extending/embedding
109109
# This goes into $(exec_prefix)
@@ -112,10 +112,10 @@ diff -aurN Python-3.3.3.orig/Makefile.pre.in Python-3.3.3/Makefile.pre.in
112112

113113
# pkgconfig directory
114114
LIBPC= $(LIBDIR)/pkgconfig
115-
diff -aurN Python-3.3.3.orig/Modules/getpath.c Python-3.3.3/Modules/getpath.c
116-
--- Python-3.3.3.orig/Modules/getpath.c 2013-11-25 12:44:06.508308702 +0100
117-
+++ Python-3.3.3/Modules/getpath.c 2013-11-25 12:58:01.150376173 +0100
118-
@@ -123,7 +123,7 @@
115+
diff -aurN Python-3.4.2.orig/Modules/getpath.c Python-3.4.2/Modules/getpath.c
116+
--- Python-3.4.2.orig/Modules/getpath.c 2014-10-08 10:18:15.000000000 +0200
117+
+++ Python-3.4.2/Modules/getpath.c 2015-01-05 17:12:01.759066613 +0100
118+
@@ -119,7 +119,7 @@
119119

120120
#ifndef PYTHONPATH
121121
#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
@@ -124,42 +124,25 @@ diff -aurN Python-3.3.3.orig/Modules/getpath.c Python-3.3.3/Modules/getpath.c
124124
#endif
125125

126126
#ifndef LANDMARK
127-
@@ -136,6 +136,7 @@
128-
static wchar_t *module_search_path = NULL;
129-
static int module_search_path_malloced = 0;
130-
static wchar_t *lib_python = L"lib/python" VERSION;
131-
+static wchar_t *lib64_python = L"lib64/python" VERSION;
127+
@@ -494,7 +494,7 @@
128+
_pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
129+
_prefix = _Py_char2wchar(PREFIX, NULL);
130+
_exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
131+
- lib_python = _Py_char2wchar("lib/python" VERSION, NULL);
132+
+ lib_python = _Py_char2wchar("lib64/python" VERSION, NULL);
132133

133-
static void
134-
reduce(wchar_t *dir)
135-
@@ -396,7 +397,7 @@
136-
else
137-
wcsncpy(exec_prefix, home, MAXPATHLEN);
138-
exec_prefix[MAXPATHLEN] = L'\0';
139-
- joinpath(exec_prefix, lib_python);
140-
+ joinpath(exec_prefix, lib64_python);
141-
joinpath(exec_prefix, L"lib-dynload");
142-
return 1;
143-
}
144-
@@ -439,7 +440,7 @@
145-
copy_absolute(exec_prefix, argv0_path, MAXPATHLEN+1);
146-
do {
147-
n = wcslen(exec_prefix);
148-
- joinpath(exec_prefix, lib_python);
149-
+ joinpath(exec_prefix, lib64_python);
150-
joinpath(exec_prefix, L"lib-dynload");
151-
if (isdir(exec_prefix))
152-
return 1;
153-
@@ -672,7 +673,7 @@
154-
fprintf(stderr,
155-
"Could not find platform independent libraries <prefix>\n");
156-
wcsncpy(prefix, _prefix, MAXPATHLEN);
157-
- joinpath(prefix, lib_python);
158-
+ joinpath(prefix, lib64_python);
134+
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
135+
Py_FatalError(
136+
@@ -683,7 +683,7 @@
159137
}
160138
else
161-
reduce(prefix);
162-
@@ -695,7 +696,7 @@
139+
wcsncpy(zip_path, _prefix, MAXPATHLEN);
140+
- joinpath(zip_path, L"lib/python00.zip");
141+
+ joinpath(zip_path, L"lib64/python00.zip");
142+
bufsz = wcslen(zip_path); /* Replace "00" with version */
143+
zip_path[bufsz - 6] = VERSION[0];
144+
zip_path[bufsz - 5] = VERSION[2];
145+
@@ -695,7 +695,7 @@
163146
fprintf(stderr,
164147
"Could not find platform dependent libraries <exec_prefix>\n");
165148
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
@@ -168,10 +151,10 @@ diff -aurN Python-3.3.3.orig/Modules/getpath.c Python-3.3.3/Modules/getpath.c
168151
}
169152
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
170153

171-
diff -aurN Python-3.3.3.orig/setup.py Python-3.3.3/setup.py
172-
--- Python-3.3.3.orig/setup.py 2013-11-25 12:44:06.536309778 +0100
173-
+++ Python-3.3.3/setup.py 2013-11-25 12:44:53.865128180 +0100
174-
@@ -712,11 +712,11 @@
154+
diff -aurN Python-3.4.2.orig/setup.py Python-3.4.2/setup.py
155+
--- Python-3.4.2.orig/setup.py 2014-10-08 10:18:16.000000000 +0200
156+
+++ Python-3.4.2/setup.py 2015-01-05 16:52:21.639815163 +0100
157+
@@ -730,11 +730,11 @@
175158
elif curses_library:
176159
readline_libs.append(curses_library)
177160
elif self.compiler.find_library_file(lib_dirs +

python3-pythonpath.patch

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,3 @@
5858
'/usr/bin/env python', line)
5959
print(filename, ':', repr(line))
6060
f = open(filename, "w")
61-
--- Python-3.0.1/Doc/README.txt.wiget 2009-02-13 00:46:00.000000000 +0100
62-
+++ Python-3.0.1/Doc/README.txt 2009-03-14 18:12:32.000000000 +0100
63-
@@ -37,7 +37,7 @@ the top-level index `build/html/index.ht
64-
To use a Python interpreter that's not called ``python``, use the standard
65-
way to set Makefile variables, using e.g. ::
66-
67-
- make html PYTHON=/usr/bin/python2.5
68-
+ make html PYTHON=/usr/bin/python3
69-
70-
Available make targets are:
71-

0 commit comments

Comments
 (0)