diff options
-rw-r--r-- | meta/recipes-devtools/python/python3/python-3.3-multilib.patch | 290 |
1 files changed, 165 insertions, 125 deletions
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch index 860190340e..08c4403cbf 100644 --- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch +++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch | |||
@@ -1,16 +1,34 @@ | |||
1 | Upstream-Status: Pending | 1 | From 51fe6f22d0ba113674fb358bd11d75fe659bd26e Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Khem Raj <raj.khem@gmail.com> | |
3 | get the sys.lib from python itself and do not use hardcoded value of 'lib' | 3 | Date: Tue, 14 May 2013 15:00:26 -0700 |
4 | Subject: [PATCH 01/13] get the sys.lib from python itself and do not use | ||
5 | hardcoded value of 'lib' | ||
4 | 6 | ||
5 | 02/2015 Rebased for 3.4.2 | 7 | 02/2015 Rebased for 3.4.2 |
6 | 8 | ||
9 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
8 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 11 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> |
9 | 12 | ||
10 | Index: Python-3.5.2/Include/pythonrun.h | 13 | --- |
11 | =================================================================== | 14 | Include/pythonrun.h | 3 +++ |
12 | --- Python-3.5.2.orig/Include/pythonrun.h | 15 | Lib/distutils/command/install.py | 4 +++- |
13 | +++ Python-3.5.2/Include/pythonrun.h | 16 | Lib/pydoc.py | 2 +- |
17 | Lib/site.py | 4 ++-- | ||
18 | Lib/sysconfig.py | 18 +++++++++--------- | ||
19 | Lib/trace.py | 4 ++-- | ||
20 | Makefile.pre.in | 7 +++++-- | ||
21 | Modules/getpath.c | 10 +++++++++- | ||
22 | Python/getplatform.c | 20 ++++++++++++++++++++ | ||
23 | Python/sysmodule.c | 4 ++++ | ||
24 | configure.ac | 35 +++++++++++++++++++++++++++++++++++ | ||
25 | setup.py | 9 ++++----- | ||
26 | 12 files changed, 97 insertions(+), 23 deletions(-) | ||
27 | |||
28 | diff --git a/Include/pythonrun.h b/Include/pythonrun.h | ||
29 | index 9c2e813..2f79cb6 100644 | ||
30 | --- a/Include/pythonrun.h | ||
31 | +++ b/Include/pythonrun.h | ||
14 | @@ -23,6 +23,9 @@ typedef struct { | 32 | @@ -23,6 +23,9 @@ typedef struct { |
15 | } PyCompilerFlags; | 33 | } PyCompilerFlags; |
16 | #endif | 34 | #endif |
@@ -21,10 +39,10 @@ Index: Python-3.5.2/Include/pythonrun.h | |||
21 | #ifndef Py_LIMITED_API | 39 | #ifndef Py_LIMITED_API |
22 | PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); | 40 | PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); |
23 | PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); | 41 | PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); |
24 | Index: Python-3.5.2/Lib/distutils/command/install.py | 42 | diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py |
25 | =================================================================== | 43 | index 67db007..b46b45b 100644 |
26 | --- Python-3.5.2.orig/Lib/distutils/command/install.py | 44 | --- a/Lib/distutils/command/install.py |
27 | +++ Python-3.5.2/Lib/distutils/command/install.py | 45 | +++ b/Lib/distutils/command/install.py |
28 | @@ -19,6 +19,8 @@ from site import USER_BASE | 46 | @@ -19,6 +19,8 @@ from site import USER_BASE |
29 | from site import USER_SITE | 47 | from site import USER_SITE |
30 | HAS_USER_SITE = True | 48 | HAS_USER_SITE = True |
@@ -43,10 +61,10 @@ Index: Python-3.5.2/Lib/distutils/command/install.py | |||
43 | 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', | 61 | 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', |
44 | 'scripts': '$base/bin', | 62 | 'scripts': '$base/bin', |
45 | 'data' : '$base', | 63 | 'data' : '$base', |
46 | Index: Python-3.5.2/Lib/pydoc.py | 64 | diff --git a/Lib/pydoc.py b/Lib/pydoc.py |
47 | =================================================================== | 65 | index 3ca08c9..6528730 100755 |
48 | --- Python-3.5.2.orig/Lib/pydoc.py | 66 | --- a/Lib/pydoc.py |
49 | +++ Python-3.5.2/Lib/pydoc.py | 67 | +++ b/Lib/pydoc.py |
50 | @@ -384,7 +384,7 @@ class Doc: | 68 | @@ -384,7 +384,7 @@ class Doc: |
51 | docmodule = docclass = docroutine = docother = docproperty = docdata = fail | 69 | docmodule = docclass = docroutine = docother = docproperty = docdata = fail |
52 | 70 | ||
@@ -56,10 +74,75 @@ Index: Python-3.5.2/Lib/pydoc.py | |||
56 | "python%d.%d" % sys.version_info[:2])): | 74 | "python%d.%d" % sys.version_info[:2])): |
57 | """Return the location of module docs or None""" | 75 | """Return the location of module docs or None""" |
58 | 76 | ||
59 | Index: Python-3.5.2/Lib/trace.py | 77 | diff --git a/Lib/site.py b/Lib/site.py |
60 | =================================================================== | 78 | index 3f78ef5..511931e 100644 |
61 | --- Python-3.5.2.orig/Lib/trace.py | 79 | --- a/Lib/site.py |
62 | +++ Python-3.5.2/Lib/trace.py | 80 | +++ b/Lib/site.py |
81 | @@ -303,12 +303,12 @@ def getsitepackages(prefixes=None): | ||
82 | seen.add(prefix) | ||
83 | |||
84 | if os.sep == '/': | ||
85 | - sitepackages.append(os.path.join(prefix, "lib", | ||
86 | + sitepackages.append(os.path.join(prefix, sys.lib, | ||
87 | "python" + sys.version[:3], | ||
88 | "site-packages")) | ||
89 | else: | ||
90 | sitepackages.append(prefix) | ||
91 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | ||
92 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | ||
93 | if sys.platform == "darwin": | ||
94 | # for framework builds *only* we add the standard Apple | ||
95 | # locations. | ||
96 | diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py | ||
97 | index 9c34be0..3d1181a 100644 | ||
98 | --- a/Lib/sysconfig.py | ||
99 | +++ b/Lib/sysconfig.py | ||
100 | @@ -20,10 +20,10 @@ __all__ = [ | ||
101 | |||
102 | _INSTALL_SCHEMES = { | ||
103 | 'posix_prefix': { | ||
104 | - 'stdlib': '{installed_base}/lib/python{py_version_short}', | ||
105 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | ||
106 | + 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}', | ||
107 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
108 | 'purelib': '{base}/lib/python{py_version_short}/site-packages', | ||
109 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
110 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
111 | 'include': | ||
112 | '{installed_base}/include/python{py_version_short}{abiflags}', | ||
113 | 'platinclude': | ||
114 | @@ -32,10 +32,10 @@ _INSTALL_SCHEMES = { | ||
115 | 'data': '{base}', | ||
116 | }, | ||
117 | 'posix_home': { | ||
118 | - 'stdlib': '{installed_base}/lib/python', | ||
119 | - 'platstdlib': '{base}/lib/python', | ||
120 | + 'stdlib': '{installed_base}/'+sys.lib+'/python', | ||
121 | + 'platstdlib': '{base}/'+sys.lib+'/python', | ||
122 | 'purelib': '{base}/lib/python', | ||
123 | - 'platlib': '{base}/lib/python', | ||
124 | + 'platlib': '{base}/'+sys.lib+'/python', | ||
125 | 'include': '{installed_base}/include/python', | ||
126 | 'platinclude': '{installed_base}/include/python', | ||
127 | 'scripts': '{base}/bin', | ||
128 | @@ -61,10 +61,10 @@ _INSTALL_SCHEMES = { | ||
129 | 'data': '{userbase}', | ||
130 | }, | ||
131 | 'posix_user': { | ||
132 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | ||
133 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | ||
134 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
135 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
136 | 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
137 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
138 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
139 | 'include': '{userbase}/include/python{py_version_short}', | ||
140 | 'scripts': '{userbase}/bin', | ||
141 | 'data': '{userbase}', | ||
142 | diff --git a/Lib/trace.py b/Lib/trace.py | ||
143 | index f108266..7fd83f2 100755 | ||
144 | --- a/Lib/trace.py | ||
145 | +++ b/Lib/trace.py | ||
63 | @@ -749,10 +749,10 @@ def main(argv=None): | 146 | @@ -749,10 +749,10 @@ def main(argv=None): |
64 | # should I also call expanduser? (after all, could use $HOME) | 147 | # should I also call expanduser? (after all, could use $HOME) |
65 | 148 | ||
@@ -73,11 +156,11 @@ Index: Python-3.5.2/Lib/trace.py | |||
73 | "python" + sys.version[:3])) | 156 | "python" + sys.version[:3])) |
74 | s = os.path.normpath(s) | 157 | s = os.path.normpath(s) |
75 | ignore_dirs.append(s) | 158 | ignore_dirs.append(s) |
76 | Index: Python-3.5.2/Makefile.pre.in | 159 | diff --git a/Makefile.pre.in b/Makefile.pre.in |
77 | =================================================================== | 160 | index 109f402..61a41e2 100644 |
78 | --- Python-3.5.2.orig/Makefile.pre.in | 161 | --- a/Makefile.pre.in |
79 | +++ Python-3.5.2/Makefile.pre.in | 162 | +++ b/Makefile.pre.in |
80 | @@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS | 163 | @@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARE |
81 | 164 | ||
82 | # Machine-dependent subdirectories | 165 | # Machine-dependent subdirectories |
83 | MACHDEP= @MACHDEP@ | 166 | MACHDEP= @MACHDEP@ |
@@ -95,7 +178,7 @@ Index: Python-3.5.2/Makefile.pre.in | |||
95 | ABIFLAGS= @ABIFLAGS@ | 178 | ABIFLAGS= @ABIFLAGS@ |
96 | 179 | ||
97 | # Detailed destination directories | 180 | # Detailed destination directories |
98 | @@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | 181 | @@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile |
99 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | 182 | -DEXEC_PREFIX='"$(exec_prefix)"' \ |
100 | -DVERSION='"$(VERSION)"' \ | 183 | -DVERSION='"$(VERSION)"' \ |
101 | -DVPATH='"$(VPATH)"' \ | 184 | -DVPATH='"$(VPATH)"' \ |
@@ -103,7 +186,7 @@ Index: Python-3.5.2/Makefile.pre.in | |||
103 | -o $@ $(srcdir)/Modules/getpath.c | 186 | -o $@ $(srcdir)/Modules/getpath.c |
104 | 187 | ||
105 | Programs/python.o: $(srcdir)/Programs/python.c | 188 | Programs/python.o: $(srcdir)/Programs/python.c |
106 | @@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O | 189 | @@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT) |
107 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) | 190 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) |
108 | 191 | ||
109 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | 192 | Python/getplatform.o: $(srcdir)/Python/getplatform.c |
@@ -112,10 +195,10 @@ Index: Python-3.5.2/Makefile.pre.in | |||
112 | 195 | ||
113 | Python/importdl.o: $(srcdir)/Python/importdl.c | 196 | Python/importdl.o: $(srcdir)/Python/importdl.c |
114 | $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | 197 | $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
115 | Index: Python-3.5.2/Modules/getpath.c | 198 | diff --git a/Modules/getpath.c b/Modules/getpath.c |
116 | =================================================================== | 199 | index 18deb60..a01c3f8 100644 |
117 | --- Python-3.5.2.orig/Modules/getpath.c | 200 | --- a/Modules/getpath.c |
118 | +++ Python-3.5.2/Modules/getpath.c | 201 | +++ b/Modules/getpath.c |
119 | @@ -105,6 +105,13 @@ | 202 | @@ -105,6 +105,13 @@ |
120 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" | 203 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" |
121 | #endif | 204 | #endif |
@@ -147,10 +230,10 @@ Index: Python-3.5.2/Modules/getpath.c | |||
147 | 230 | ||
148 | if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { | 231 | if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { |
149 | Py_FatalError( | 232 | Py_FatalError( |
150 | Index: Python-3.5.2/Python/getplatform.c | 233 | diff --git a/Python/getplatform.c b/Python/getplatform.c |
151 | =================================================================== | 234 | index 6899140..66a49c6 100644 |
152 | --- Python-3.5.2.orig/Python/getplatform.c | 235 | --- a/Python/getplatform.c |
153 | +++ Python-3.5.2/Python/getplatform.c | 236 | +++ b/Python/getplatform.c |
154 | @@ -10,3 +10,23 @@ Py_GetPlatform(void) | 237 | @@ -10,3 +10,23 @@ Py_GetPlatform(void) |
155 | { | 238 | { |
156 | return PLATFORM; | 239 | return PLATFORM; |
@@ -175,10 +258,10 @@ Index: Python-3.5.2/Python/getplatform.c | |||
175 | +{ | 258 | +{ |
176 | + return LIB; | 259 | + return LIB; |
177 | +} | 260 | +} |
178 | Index: Python-3.5.2/Python/sysmodule.c | 261 | diff --git a/Python/sysmodule.c b/Python/sysmodule.c |
179 | =================================================================== | 262 | index 8d7e05a..d9dee0f 100644 |
180 | --- Python-3.5.2.orig/Python/sysmodule.c | 263 | --- a/Python/sysmodule.c |
181 | +++ Python-3.5.2/Python/sysmodule.c | 264 | +++ b/Python/sysmodule.c |
182 | @@ -1790,6 +1790,10 @@ _PySys_Init(void) | 265 | @@ -1790,6 +1790,10 @@ _PySys_Init(void) |
183 | PyUnicode_FromString(Py_GetCopyright())); | 266 | PyUnicode_FromString(Py_GetCopyright())); |
184 | SET_SYS_FROM_STRING("platform", | 267 | SET_SYS_FROM_STRING("platform", |
@@ -190,93 +273,10 @@ Index: Python-3.5.2/Python/sysmodule.c | |||
190 | SET_SYS_FROM_STRING("executable", | 273 | SET_SYS_FROM_STRING("executable", |
191 | PyUnicode_FromWideChar( | 274 | PyUnicode_FromWideChar( |
192 | Py_GetProgramFullPath(), -1)); | 275 | Py_GetProgramFullPath(), -1)); |
193 | Index: Python-3.5.2/setup.py | 276 | diff --git a/configure.ac b/configure.ac |
194 | =================================================================== | 277 | index 707324d..e8d59a3 100644 |
195 | --- Python-3.5.2.orig/setup.py | 278 | --- a/configure.ac |
196 | +++ Python-3.5.2/setup.py | 279 | +++ b/configure.ac |
197 | @@ -495,7 +495,7 @@ class PyBuildExt(build_ext): | ||
198 | # directories (i.e. '.' and 'Include') must be first. See issue | ||
199 | # 10520. | ||
200 | if not cross_compiling: | ||
201 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
202 | + add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib)) | ||
203 | add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
204 | # only change this for cross builds for 3.3, issues on Mageia | ||
205 | if cross_compiling: | ||
206 | @@ -553,8 +553,7 @@ class PyBuildExt(build_ext): | ||
207 | # be assumed that no additional -I,-L directives are needed. | ||
208 | if not cross_compiling: | ||
209 | lib_dirs = self.compiler.library_dirs + [ | ||
210 | - '/lib64', '/usr/lib64', | ||
211 | - '/lib', '/usr/lib', | ||
212 | + '/' + sys.lib, '/usr/' + sys.lib, | ||
213 | ] | ||
214 | inc_dirs = self.compiler.include_dirs + ['/usr/include'] | ||
215 | else: | ||
216 | @@ -746,11 +745,11 @@ class PyBuildExt(build_ext): | ||
217 | elif curses_library: | ||
218 | readline_libs.append(curses_library) | ||
219 | elif self.compiler.find_library_file(lib_dirs + | ||
220 | - ['/usr/lib/termcap'], | ||
221 | + ['/usr/'+sys.lib+'/termcap'], | ||
222 | 'termcap'): | ||
223 | readline_libs.append('termcap') | ||
224 | exts.append( Extension('readline', ['readline.c'], | ||
225 | - library_dirs=['/usr/lib/termcap'], | ||
226 | + library_dirs=['/usr/'+sys.lib+'/termcap'], | ||
227 | extra_link_args=readline_extra_link_args, | ||
228 | libraries=readline_libs) ) | ||
229 | else: | ||
230 | Index: Python-3.5.2/Lib/sysconfig.py | ||
231 | =================================================================== | ||
232 | --- Python-3.5.2.orig/Lib/sysconfig.py | ||
233 | +++ Python-3.5.2/Lib/sysconfig.py | ||
234 | @@ -20,10 +20,10 @@ __all__ = [ | ||
235 | |||
236 | _INSTALL_SCHEMES = { | ||
237 | 'posix_prefix': { | ||
238 | - 'stdlib': '{installed_base}/lib/python{py_version_short}', | ||
239 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | ||
240 | + 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}', | ||
241 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
242 | 'purelib': '{base}/lib/python{py_version_short}/site-packages', | ||
243 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
244 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
245 | 'include': | ||
246 | '{installed_base}/include/python{py_version_short}{abiflags}', | ||
247 | 'platinclude': | ||
248 | @@ -32,10 +32,10 @@ _INSTALL_SCHEMES = { | ||
249 | 'data': '{base}', | ||
250 | }, | ||
251 | 'posix_home': { | ||
252 | - 'stdlib': '{installed_base}/lib/python', | ||
253 | - 'platstdlib': '{base}/lib/python', | ||
254 | + 'stdlib': '{installed_base}/'+sys.lib+'/python', | ||
255 | + 'platstdlib': '{base}/'+sys.lib+'/python', | ||
256 | 'purelib': '{base}/lib/python', | ||
257 | - 'platlib': '{base}/lib/python', | ||
258 | + 'platlib': '{base}/'+sys.lib+'/python', | ||
259 | 'include': '{installed_base}/include/python', | ||
260 | 'platinclude': '{installed_base}/include/python', | ||
261 | 'scripts': '{base}/bin', | ||
262 | @@ -61,10 +61,10 @@ _INSTALL_SCHEMES = { | ||
263 | 'data': '{userbase}', | ||
264 | }, | ||
265 | 'posix_user': { | ||
266 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | ||
267 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | ||
268 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
269 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
270 | 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
271 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
272 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
273 | 'include': '{userbase}/include/python{py_version_short}', | ||
274 | 'scripts': '{userbase}/bin', | ||
275 | 'data': '{userbase}', | ||
276 | Index: Python-3.5.2/configure.ac | ||
277 | =================================================================== | ||
278 | --- Python-3.5.2.orig/configure.ac | ||
279 | +++ Python-3.5.2/configure.ac | ||
280 | @@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP | 280 | @@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP |
281 | AC_SUBST(PLATDIR) | 281 | AC_SUBST(PLATDIR) |
282 | AC_SUBST(PLATFORM_TRIPLET) | 282 | AC_SUBST(PLATFORM_TRIPLET) |
@@ -319,3 +319,43 @@ Index: Python-3.5.2/configure.ac | |||
319 | 319 | ||
320 | AC_MSG_CHECKING([for -Wl,--no-as-needed]) | 320 | AC_MSG_CHECKING([for -Wl,--no-as-needed]) |
321 | save_LDFLAGS="$LDFLAGS" | 321 | save_LDFLAGS="$LDFLAGS" |
322 | diff --git a/setup.py b/setup.py | ||
323 | index 6d26deb..7b14215 100644 | ||
324 | --- a/setup.py | ||
325 | +++ b/setup.py | ||
326 | @@ -495,7 +495,7 @@ class PyBuildExt(build_ext): | ||
327 | # directories (i.e. '.' and 'Include') must be first. See issue | ||
328 | # 10520. | ||
329 | if not cross_compiling: | ||
330 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
331 | + add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib)) | ||
332 | add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
333 | # only change this for cross builds for 3.3, issues on Mageia | ||
334 | if cross_compiling: | ||
335 | @@ -553,8 +553,7 @@ class PyBuildExt(build_ext): | ||
336 | # be assumed that no additional -I,-L directives are needed. | ||
337 | if not cross_compiling: | ||
338 | lib_dirs = self.compiler.library_dirs + [ | ||
339 | - '/lib64', '/usr/lib64', | ||
340 | - '/lib', '/usr/lib', | ||
341 | + '/' + sys.lib, '/usr/' + sys.lib, | ||
342 | ] | ||
343 | inc_dirs = self.compiler.include_dirs + ['/usr/include'] | ||
344 | else: | ||
345 | @@ -746,11 +745,11 @@ class PyBuildExt(build_ext): | ||
346 | elif curses_library: | ||
347 | readline_libs.append(curses_library) | ||
348 | elif self.compiler.find_library_file(lib_dirs + | ||
349 | - ['/usr/lib/termcap'], | ||
350 | + ['/usr/'+sys.lib+'/termcap'], | ||
351 | 'termcap'): | ||
352 | readline_libs.append('termcap') | ||
353 | exts.append( Extension('readline', ['readline.c'], | ||
354 | - library_dirs=['/usr/lib/termcap'], | ||
355 | + library_dirs=['/usr/'+sys.lib+'/termcap'], | ||
356 | extra_link_args=readline_extra_link_args, | ||
357 | libraries=readline_libs) ) | ||
358 | else: | ||
359 | -- | ||
360 | 2.11.0 | ||
361 | |||