Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 268887 | Differences between
and this patch

Collapse All | Expand All

(-)Lib/distutils/sysconfig.py (+17 lines)
Lines 19-27 Link Here
19
from distutils.errors import DistutilsPlatformError
19
from distutils.errors import DistutilsPlatformError
20
20
21
# These are needed in a couple of spots, so just compute them once.
21
# These are needed in a couple of spots, so just compute them once.
22
SYSROOT = os.getenv('SYSROOT')
22
PREFIX = os.path.normpath(sys.prefix)
23
PREFIX = os.path.normpath(sys.prefix)
23
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
24
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
24
25
26
# Make sure we respect the user specified SYSROOT environment variable
27
# This is the first step to get distutils to crosscompile stuff
28
if SYSROOT is not None:
29
    PREFIX = os.path.normpath(SYSROOT+os.path.sep+PREFIX)
30
    EXEC_PREFIX = os.path.normpath(SYSROOT+os.path.sep+EXEC_PREFIX)
31
25
# python_build: (Boolean) if true, we're either building Python or
32
# python_build: (Boolean) if true, we're either building Python or
26
# building an extension with an un-installed Python, so we use
33
# building an extension with an un-installed Python, so we use
27
# different (hard-wired) directories.
34
# different (hard-wired) directories.
Lines 94-99 Link Here
94
101
95
    If 'prefix' is supplied, use it instead of sys.prefix or
102
    If 'prefix' is supplied, use it instead of sys.prefix or
96
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
103
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
104
105
    For the posix system we can not always assume to have a lib64 directory
106
    e.g. for cross-compile between 32 & 64 bit systems. So we test if the
107
    'lib64' directory exists and use the normal 'lib' dir as fallback.
97
    """
108
    """
98
    if prefix is None:
109
    if prefix is None:
99
        prefix = plat_specific and EXEC_PREFIX or PREFIX
110
        prefix = plat_specific and EXEC_PREFIX or PREFIX
Lines 102-107 Link Here
102
        libpython = os.path.join(prefix,
113
        libpython = os.path.join(prefix,
103
                                 "@@GENTOO_LIBDIR@@", 
114
                                 "@@GENTOO_LIBDIR@@", 
104
                                 "python" + get_python_version())
115
                                 "python" + get_python_version())
116
117
        if not os.path.exists(libpython):
118
            libpython = os.path.join(prefix,
119
                                     "lib", 
120
                                     "python" + get_python_version())
121
        
105
        if standard_lib:
122
        if standard_lib:
106
            return libpython
123
            return libpython
107
        else:
124
        else:

Return to bug 268887