Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 190587 Details for
Bug 268887
dev-lang/python cross compilation aware
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python 2.5.2 cross distuils sysconfig
python-2.5.2-cross-distutils-sysconfig.patch (text/plain), 2.16 KB, created by
Maksim 'max_posedon' Melnikau
on 2009-05-07 00:19:08 UTC
(
hide
)
Description:
python 2.5.2 cross distuils sysconfig
Filename:
MIME Type:
Creator:
Maksim 'max_posedon' Melnikau
Created:
2009-05-07 00:19:08 UTC
Size:
2.16 KB
patch
obsolete
>This patch adds prepends the 'SYSROOT' path specified by the environment >to the standard prefixes. By doing so we solve a whole bunch of problems >with cross-compiling and installing python extensions. > >The second part provides a fallback if the lib64 directory does not exist. >This is an ugly hack for now, the right fix would be to determine if the >target system is 32 or 64bit and adapt the libdir accordingly. > >--- Lib/distutils/sysconfig.py 2008-09-27 15:55:24.000000000 +0200 >+++ Lib/distutils/sysconfig.py.new 2008-09-27 15:55:36.000000000 +0200 >@@ -19,9 +19,16 @@ > from distutils.errors import DistutilsPlatformError > > # These are needed in a couple of spots, so just compute them once. >+SYSROOT = os.getenv('SYSROOT') > PREFIX = os.path.normpath(sys.prefix) > EXEC_PREFIX = os.path.normpath(sys.exec_prefix) > >+# Make sure we respect the user specified SYSROOT environment variable >+# This is the first step to get distutils to crosscompile stuff >+if SYSROOT is not None: >+ PREFIX = os.path.normpath(SYSROOT+os.path.sep+PREFIX) >+ EXEC_PREFIX = os.path.normpath(SYSROOT+os.path.sep+EXEC_PREFIX) >+ > # python_build: (Boolean) if true, we're either building Python or > # building an extension with an un-installed Python, so we use > # different (hard-wired) directories. >@@ -94,6 +101,10 @@ > > If 'prefix' is supplied, use it instead of sys.prefix or > sys.exec_prefix -- i.e., ignore 'plat_specific'. >+ >+ For the posix system we can not always assume to have a lib64 directory >+ e.g. for cross-compile between 32 & 64 bit systems. So we test if the >+ 'lib64' directory exists and use the normal 'lib' dir as fallback. > """ > if prefix is None: > prefix = plat_specific and EXEC_PREFIX or PREFIX >@@ -102,6 +113,12 @@ > libpython = os.path.join(prefix, > "@@GENTOO_LIBDIR@@", > "python" + get_python_version()) >+ >+ if not os.path.exists(libpython): >+ libpython = os.path.join(prefix, >+ "lib", >+ "python" + get_python_version()) >+ > if standard_lib: > return libpython > else:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268887
:
190575
|
190577
|
190579
|
190580
|
190582
|
190583
|
190585
| 190587 |
190588
|
190590
|
190591
|
190592
|
190639
|
190742
|
192741
|
311657
|
311659