parent
f6e6fcd199
commit
a2b193afe8
|
@ -41,8 +41,8 @@ else:
|
|||
|
||||
INSTALL_SCHEMES = {
|
||||
'unix_prefix': {
|
||||
'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
|
||||
'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
|
||||
'purelib': '$base/lib/python$py_version_short/site-packages',
|
||||
'platlib': '$platbase/lib/python$py_version_short/site-packages',
|
||||
'headers': '$base/include/python$py_version_short/$dist_name',
|
||||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
|
|
|
@ -130,7 +130,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|||
|
||||
if os.name == "posix":
|
||||
libpython = os.path.join(prefix,
|
||||
"@@GENTOO_LIBDIR@@", "python" + get_python_version())
|
||||
"lib", "python" + get_python_version())
|
||||
if standard_lib:
|
||||
return libpython
|
||||
else:
|
||||
|
|
|
@ -288,10 +288,10 @@ def getsitepackages():
|
|||
if sys.platform in ('os2emx', 'riscos'):
|
||||
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
|
||||
elif os.sep == '/':
|
||||
sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
|
||||
sitepackages.append(os.path.join(prefix, "lib",
|
||||
"python" + sys.version[:3],
|
||||
"site-packages"))
|
||||
sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
|
||||
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
|
||||
else:
|
||||
sitepackages.append(prefix)
|
||||
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||
|
|
|
@ -7,10 +7,10 @@ from os.path import pardir, realpath
|
|||
|
||||
_INSTALL_SCHEMES = {
|
||||
'posix_prefix': {
|
||||
'stdlib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}',
|
||||
'platstdlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
|
||||
'purelib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
|
||||
'platlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
|
||||
'stdlib': '{base}/lib/python{py_version_short}',
|
||||
'platstdlib': '{platbase}/lib/python{py_version_short}',
|
||||
'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
||||
'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
|
||||
'include': '{base}/include/python{py_version_short}',
|
||||
'platinclude': '{platbase}/include/python{py_version_short}',
|
||||
'scripts': '{base}/bin',
|
||||
|
@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
|
|||
'data' : '{userbase}',
|
||||
},
|
||||
'posix_user': {
|
||||
'stdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
|
||||
'platstdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
|
||||
'purelib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
|
||||
'platlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
|
||||
'stdlib': '{userbase}/lib/python{py_version_short}',
|
||||
'platstdlib': '{userbase}/lib/python{py_version_short}',
|
||||
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
'include': '{userbase}/include/python{py_version_short}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data' : '{userbase}',
|
||||
|
|
|
@ -255,10 +255,10 @@ class HelperFunctionsTests(unittest.TestCase):
|
|||
elif os.sep == '/':
|
||||
# OS X, Linux, FreeBSD, etc
|
||||
self.assertEqual(len(dirs), 2)
|
||||
wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
|
||||
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||
'site-packages')
|
||||
self.assertEqual(dirs[0], wanted)
|
||||
wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
|
||||
wanted = os.path.join('xoxo', 'lib', 'site-python')
|
||||
self.assertEqual(dirs[1], wanted)
|
||||
else:
|
||||
# other platforms
|
||||
|
|
|
@ -110,7 +110,7 @@ LIBDIR= @libdir@
|
|||
MANDIR= @mandir@
|
||||
INCLUDEDIR= @includedir@
|
||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
||||
SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
|
||||
SCRIPTDIR= $(prefix)/lib
|
||||
|
||||
# Detailed destination directories
|
||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||
|
|
|
@ -464,7 +464,7 @@ GLHACK=-Dclear=__GLclear
|
|||
# Andrew Kuchling's zlib module.
|
||||
# This require zlib 1.1.3 (or later).
|
||||
# See http://www.gzip.org/zlib/
|
||||
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
|
||||
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
|
||||
|
||||
# Interface to the Expat XML parser
|
||||
# More information on Expat can be found at www.libexpat.org.
|
||||
|
|
|
@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
|
|||
static char exec_prefix[MAXPATHLEN+1];
|
||||
static char progpath[MAXPATHLEN+1];
|
||||
static char *module_search_path = NULL;
|
||||
static char lib_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
|
||||
static char lib_python[] = "lib/python" VERSION;
|
||||
|
||||
static void
|
||||
reduce(char *dir)
|
||||
|
@ -520,7 +520,7 @@ calculate_path(void)
|
|||
}
|
||||
else
|
||||
strncpy(zip_path, PREFIX, MAXPATHLEN);
|
||||
joinpath(zip_path, "@@GENTOO_LIBDIR@@/python00.zip");
|
||||
joinpath(zip_path, "lib/python00.zip");
|
||||
bufsz = strlen(zip_path); /* Replace "00" with version */
|
||||
zip_path[bufsz - 6] = VERSION[0];
|
||||
zip_path[bufsz - 5] = VERSION[2];
|
||||
|
@ -530,7 +530,7 @@ calculate_path(void)
|
|||
fprintf(stderr,
|
||||
"Could not find platform dependent libraries <exec_prefix>\n");
|
||||
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
|
||||
joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
|
||||
joinpath(exec_prefix, "lib/lib-dynload");
|
||||
}
|
||||
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
||||
|
||||
|
|
25
setup.py
25
setup.py
|
@ -519,7 +519,7 @@ class PyBuildExt(build_ext):
|
|||
global disable_ssl
|
||||
# Ensure that /usr/local is always used
|
||||
if not cross_compiling:
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/@@GENTOO_LIBDIR@@')
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
if cross_compiling:
|
||||
self.add_gcc_paths()
|
||||
|
@ -586,7 +586,8 @@ class PyBuildExt(build_ext):
|
|||
):
|
||||
add_dir_to_list(inc_dirs, d)
|
||||
for d in (
|
||||
'/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
|
||||
'/lib64', '/usr/lib64',
|
||||
'/lib', '/usr/lib',
|
||||
):
|
||||
add_dir_to_list(lib_dirs, d)
|
||||
exts = []
|
||||
|
@ -844,11 +845,11 @@ class PyBuildExt(build_ext):
|
|||
elif curses_library:
|
||||
readline_libs.append(curses_library)
|
||||
elif self.compiler.find_library_file(lib_dirs +
|
||||
['/usr/@@GENTOO_LIBDIR@@/termcap'],
|
||||
['/usr/lib/termcap'],
|
||||
'termcap'):
|
||||
readline_libs.append('termcap')
|
||||
exts.append( Extension('readline', ['readline.c'],
|
||||
library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
|
||||
library_dirs=['/usr/lib/termcap'],
|
||||
extra_link_args=readline_extra_link_args,
|
||||
libraries=readline_libs) )
|
||||
else:
|
||||
|
@ -1114,7 +1115,8 @@ class PyBuildExt(build_ext):
|
|||
|
||||
# check lib directories parallel to the location of the header
|
||||
db_dirs_to_check = [
|
||||
db_incdir.replace("include", '@@GENTOO_LIBDIR@@'),
|
||||
db_incdir.replace("include", 'lib64'),
|
||||
db_incdir.replace("include", 'lib'),
|
||||
]
|
||||
|
||||
if host_platform != 'darwin':
|
||||
|
@ -1227,8 +1229,10 @@ class PyBuildExt(build_ext):
|
|||
|
||||
if sqlite_incdir:
|
||||
sqlite_dirs_to_check = [
|
||||
os.path.join(sqlite_incdir, '..', '@@GENTOO_LIBDIR@@'),
|
||||
os.path.join(sqlite_incdir, '..', '..', '@@GENTOO_LIBDIR@@'),
|
||||
os.path.join(sqlite_incdir, '..', 'lib64'),
|
||||
os.path.join(sqlite_incdir, '..', 'lib'),
|
||||
os.path.join(sqlite_incdir, '..', '..', 'lib64'),
|
||||
os.path.join(sqlite_incdir, '..', '..', 'lib'),
|
||||
]
|
||||
sqlite_libfile = self.compiler.find_library_file(
|
||||
sqlite_dirs_to_check + lib_dirs, 'sqlite3')
|
||||
|
@ -1997,14 +2001,15 @@ class PyBuildExt(build_ext):
|
|||
added_lib_dirs.append('/usr/openwin/lib')
|
||||
elif os.path.exists('/usr/X11R6/include'):
|
||||
include_dirs.append('/usr/X11R6/include')
|
||||
added_lib_dirs.append('/usr/X11R6/@@GENTOO_LIBDIR@@')
|
||||
added_lib_dirs.append('/usr/X11R6/lib64')
|
||||
added_lib_dirs.append('/usr/X11R6/lib')
|
||||
elif os.path.exists('/usr/X11R5/include'):
|
||||
include_dirs.append('/usr/X11R5/include')
|
||||
added_lib_dirs.append('/usr/X11R5/@@GENTOO_LIBDIR@@')
|
||||
added_lib_dirs.append('/usr/X11R5/lib')
|
||||
else:
|
||||
# Assume default location for X11
|
||||
include_dirs.append('/usr/X11/include')
|
||||
added_lib_dirs.append('/usr/X11/@@GENTOO_LIBDIR@@')
|
||||
added_lib_dirs.append('/usr/X11/lib')
|
||||
|
||||
# If Cygwin, then verify that X is installed before proceeding
|
||||
if host_platform == 'cygwin':
|
||||
|
|
Loading…
Reference in New Issue