diff --git a/00102-lib64.patch b/00102-lib64.patch index 8e9ae4e..2c37728 100644 --- a/00102-lib64.patch +++ b/00102-lib64.patch @@ -5,10 +5,10 @@ index 9474e9c..c0ce4c6 100644 @@ -30,14 +30,14 @@ WINDOWS_SCHEME = { INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', -+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', + 'purelib': '$base/lib/platform-python$py_version_short/site-packages', +- 'platlib': '$platbase/lib/platform-python$py_version_short/site-packages', ++ 'platlib': '$platbase/lib64/platform-python$py_version_short/site-packages', + 'headers': '$base/include/platform-python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, @@ -32,8 +32,8 @@ index 026cca7..6d3e077 100644 + else: + lib = "lib" libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) +- "lib", "platform-python" + get_python_version()) ++ lib, "platform-python" + get_python_version()) if standard_lib: return libpython else: @@ -46,10 +46,10 @@ index a84e3bb..ba0d3ea 100644 if os.sep == '/': + sitepackages.append(os.path.join(prefix, "lib64", -+ "python" + sys.version[:3], ++ "platform-python" + sys.version[:3], + "site-packages")) sitepackages.append(os.path.join(prefix, "lib", - "python%d.%d" % sys.version_info[:2], + "platform-python%d.%d" % sys.version_info[:2], "site-packages")) else: sitepackages.append(prefix) @@ -65,28 +65,28 @@ index b9bbfe5..2a5f29c 100644 _INSTALL_SCHEMES = { 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -+ 'stdlib': '{installed_base}/lib64/python{py_version_short}', -+ 'platstdlib': '{platbase}/lib64/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', +- 'stdlib': '{installed_base}/lib/platform-python{py_version_short}', +- 'platstdlib': '{platbase}/lib/platform-python{py_version_short}', ++ 'stdlib': '{installed_base}/lib64/platform-python{py_version_short}', ++ 'platstdlib': '{platbase}/lib64/platform-python{py_version_short}', + 'purelib': '{base}/lib/platform-python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/platform-python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/lib64/platform-python{py_version_short}/site-packages', 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', + '{installed_base}/include/platform-python{py_version_short}{abiflags}', 'platinclude': @@ -61,10 +61,10 @@ _INSTALL_SCHEMES = { 'data': '{userbase}', }, 'posix_user': { -- 'stdlib': '{userbase}/lib/python{py_version_short}', -- 'platstdlib': '{userbase}/lib/python{py_version_short}', -+ 'stdlib': '{userbase}/lib64/python{py_version_short}', -+ 'platstdlib': '{userbase}/lib64/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', +- 'stdlib': '{userbase}/lib/platform-python{py_version_short}', +- 'platstdlib': '{userbase}/lib/platform-python{py_version_short}', ++ 'stdlib': '{userbase}/lib64/platform-python{py_version_short}', ++ 'platstdlib': '{userbase}/lib64/platform-python{py_version_short}', + 'purelib': '{userbase}/lib/platform-python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/platform-python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/lib64/platform-python{py_version_short}/site-packages', + 'include': '{userbase}/include/platform-python{py_version_short}', 'scripts': '{userbase}/bin', 'data': '{userbase}', diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py @@ -125,8 +125,8 @@ index 65b47a3..eaa756c 100644 _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); _prefix = Py_DecodeLocale(PREFIX, NULL); _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); -- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); -+ lib_python = Py_DecodeLocale("lib64/python" VERSION, NULL); +- lib_python = Py_DecodeLocale("lib/platform-python" VERSION, NULL); ++ lib_python = Py_DecodeLocale("lib64/platform-python" VERSION, NULL); if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { Py_FatalError( diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch index 6929fda..9fbcc24 100644 --- a/00111-no-static-lib.patch +++ b/00111-no-static-lib.patch @@ -27,7 +27,7 @@ index 70e5927..04c8e3d 100644 - $(AR) $(ARFLAGS) $@ $(MODOBJS) - $(RANLIB) $@ - - libpython$(LDVERSION).so: $(LIBRARY_OBJS) + libplatform-python$(LDVERSION).so: $(LIBRARY_OBJS) if test $(INSTSONAME) != $(LDLIBRARY); then \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ @@ -702,7 +690,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist diff --git a/02000-platform-python.patch b/02000-platform-python.patch deleted file mode 100644 index 4d36a0f..0000000 --- a/02000-platform-python.patch +++ /dev/null @@ -1,449 +0,0 @@ -diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py -index 74de782..3752cb4 100644 ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -747,7 +747,7 @@ class build_ext(Command): - else: - from distutils import sysconfig - if sysconfig.get_config_var('Py_ENABLE_SHARED'): -- pythonlib = 'python{}.{}{}'.format( -+ pythonlib = 'platform-python{}.{}{}'.format( - sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, - sysconfig.get_config_var('ABIFLAGS')) - return ext.libraries + [pythonlib] -diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py -index ed44a93..84073f9 100644 ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -29,9 +29,9 @@ WINDOWS_SCHEME = { - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib64/python$py_version_short/site-packages', -- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', -+ 'purelib': '$base/lib/platform-python$py_version_short/site-packages', -+ 'platlib': '$platbase/lib64/platform-python$py_version_short/site-packages', -+ 'headers': '$base/include/platform-python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, -@@ -59,7 +59,7 @@ if HAS_USER_SITE: - 'purelib': '$usersite', - 'platlib': '$usersite', - 'headers': -- '$userbase/include/python$py_version_short$abiflags/$dist_name', -+ '$userbase/include/platform-python$py_version_short$abiflags/$dist_name', - 'scripts': '$userbase/bin', - 'data' : '$userbase', - } -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 2013efa..bb265f7 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -134,7 +134,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - else: - lib = "lib" - libpython = os.path.join(prefix, -- lib, "python" + get_python_version()) -+ lib, "platform-python" + get_python_version()) - if standard_lib: - return libpython - else: -diff --git a/Lib/site.py b/Lib/site.py -index b5fe571..d3f9fd6 100644 ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -305,10 +305,10 @@ def getsitepackages(prefixes=None): - - if os.sep == '/': - sitepackages.append(os.path.join(prefix, "lib64", -- "python" + sys.version[:3], -+ "platform-python" + sys.version[:3], - "site-packages")) - sitepackages.append(os.path.join(prefix, "lib", -- "python%d.%d" % sys.version_info[:2], -+ "platform-python%d.%d" % sys.version_info[:2], - "site-packages")) - else: - sitepackages.append(prefix) -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index 240bb66..c6962f2 100644 ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -20,14 +20,14 @@ __all__ = [ - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib64/python{py_version_short}', -- 'platstdlib': '{platbase}/lib64/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages', -+ 'stdlib': '{installed_base}/lib64/platform-python{py_version_short}', -+ 'platstdlib': '{platbase}/lib64/platform-python{py_version_short}', -+ 'purelib': '{base}/lib/platform-python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/lib64/platform-python{py_version_short}/site-packages', - 'include': -- '{installed_base}/include/python{py_version_short}{abiflags}', -+ '{installed_base}/include/platform-python{py_version_short}{abiflags}', - 'platinclude': -- '{installed_platbase}/include/python{py_version_short}{abiflags}', -+ '{installed_platbase}/include/platform-python{py_version_short}{abiflags}', - 'scripts': '{base}/bin', - 'data': '{base}', - }, -@@ -61,11 +61,11 @@ _INSTALL_SCHEMES = { - 'data': '{userbase}', - }, - 'posix_user': { -- 'stdlib': '{userbase}/lib64/python{py_version_short}', -- 'platstdlib': '{userbase}/lib64/python{py_version_short}', -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages', -- 'include': '{userbase}/include/python{py_version_short}', -+ 'stdlib': '{userbase}/lib64/platform-python{py_version_short}', -+ 'platstdlib': '{userbase}/lib64/platform-python{py_version_short}', -+ 'purelib': '{userbase}/lib/platform-python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/lib64/platform-python{py_version_short}/site-packages', -+ 'include': '{userbase}/include/platform-python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', - }, -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 4f8c042..639f220 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -137,10 +137,10 @@ SCRIPTDIR= $(prefix)/lib64 - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories --BINLIBDEST= $(LIBDIR)/python$(VERSION) --LIBDEST= $(SCRIPTDIR)/python$(VERSION) --INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) --CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) -+BINLIBDEST= $(LIBDIR)/platform-python$(VERSION) -+LIBDEST= $(SCRIPTDIR)/platform-python$(VERSION) -+INCLUDEPY= $(INCLUDEDIR)/platform-python$(LDVERSION) -+CONFINCLUDEPY= $(CONFINCLUDEDIR)/platform-python$(LDVERSION) - - # Symbols used for using shared libraries - SHLIB_SUFFIX= @SHLIB_SUFFIX@ -@@ -578,7 +578,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - --libpython$(LDVERSION).so: $(LIBRARY_OBJS) -+libplatform-python$(LDVERSION).so: $(LIBRARY_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ - $(LN) -f $(INSTSONAME) $@; \ -@@ -586,14 +586,14 @@ libpython$(LDVERSION).so: $(LIBRARY_OBJS) - $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ - fi - --libpython3.so: libpython$(LDVERSION).so -+libplatform-python3.so: libplatform-python$(LDVERSION).so - $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ - --libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) -- $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -+libplatform-python$(LDVERSION).dylib: $(LIBRARY_OBJS) -+ $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libplatform-python$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ - - --libpython$(VERSION).sl: $(LIBRARY_OBJS) -+libplatform-python$(VERSION).sl: $(LIBRARY_OBJS) - $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST) - - # Copy up the gdb python hooks into a position where they can be automatically -@@ -631,7 +631,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ - - # This rule builds the Cygwin Python DLL and import library if configured - # for a shared core library; otherwise, this rule is a noop. --$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) -+$(DLLLIBRARY) libplatform-python$(VERSION).dll.a: $(LIBRARY_OBJS) - if test -n "$(DLLLIBRARY)"; then \ - $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ - $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ -@@ -1461,12 +1461,12 @@ frameworkinstallstructure: $(LDLIBRARY) - # Install a number of symlinks to keep software that expects a normal unix - # install (which includes python-config) happy. - frameworkinstallmaclib: -- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a" -- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib" -- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a" -- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib" -- $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib" -- $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib" -+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(LDVERSION).a" -+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(LDVERSION).dylib" -+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(VERSION).a" -+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(VERSION).dylib" -+ $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libplatformp-ython$(LDVERSION).dylib" -+ $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libplatformp-ython$(VERSION).dylib" - - # This installs the IDE, the Launcher and other apps into /Applications - frameworkinstallapps: -diff --git a/Misc/python-config.in b/Misc/python-config.in -index e13da75..c45c4d8 100644 ---- a/Misc/python-config.in -+++ b/Misc/python-config.in -@@ -47,7 +47,7 @@ for opt in opt_flags: - print(' '.join(flags)) - - elif opt in ('--libs', '--ldflags'): -- libs = ['-lpython' + pyver + sys.abiflags] -+ libs = ['-lplatform-python' + pyver + sys.abiflags] - libs += getvar('LIBS').split() - libs += getvar('SYSLIBS').split() - # add the prefix/lib/pythonX.Y/config dir, but only if there is no -diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in -index 30c6927..6606322 100644 ---- a/Misc/python-config.sh.in -+++ b/Misc/python-config.sh.in -@@ -40,7 +40,7 @@ LIBM="@LIBM@" - LIBC="@LIBC@" - SYSLIBS="$LIBM $LIBC" - ABIFLAGS="@ABIFLAGS@" --LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" -+LIBS="-lplatform-python${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" - BASECFLAGS="@BASECFLAGS@" - LDLIBRARY="@LDLIBRARY@" - LINKFORSHARED="@LINKFORSHARED@" -@@ -51,8 +51,8 @@ LIBDEST=${prefix}/lib/python${VERSION} - LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#") - SO="@EXT_SUFFIX@" - PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" --INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" --PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" -+INCDIR="-I$includedir/platform-python${VERSION}${ABIFLAGS}" -+PLATINCDIR="-I$includedir/platform-python${VERSION}${ABIFLAGS}" - - # Scan for --help or unknown argument. - for ARG in $* -diff --git a/Misc/python.pc.in b/Misc/python.pc.in -index ae69867..c7bf798 100644 ---- a/Misc/python.pc.in -+++ b/Misc/python.pc.in -@@ -9,5 +9,5 @@ Description: Python library - Requires: - Version: @VERSION@ - Libs.private: @LIBS@ --Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@ --Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ -+Libs: -L${libdir} -lplatform-python@VERSION@@ABIFLAGS@ -+Cflags: -I${includedir}/platform-python@VERSION@@ABIFLAGS@ -diff --git a/Modules/getpath.c b/Modules/getpath.c -index c4055be..248d654 100644 ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -494,7 +494,7 @@ calculate_path(void) - _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); - _prefix = Py_DecodeLocale(PREFIX, NULL); - _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); -- lib_python = Py_DecodeLocale("lib64/python" VERSION, NULL); -+ lib_python = Py_DecodeLocale("lib64/platform-python" VERSION, NULL); - - if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { - Py_FatalError( -diff --git a/Modules/makesetup b/Modules/makesetup -index 8db8de8..3d6a3d0 100755 ---- a/Modules/makesetup -+++ b/Modules/makesetup -@@ -92,7 +92,7 @@ CYGWIN*) if test $libdir = . - else - ExtraLibDir='$(LIBPL)' - fi -- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";; -+ ExtraLibs="-L$ExtraLibDir -lplatform-python\$(VERSION)";; - esac - - # Main loop -diff --git a/configure b/configure -index eea17a4..335722f 100755 ---- a/configure -+++ b/configure -@@ -5741,7 +5741,7 @@ esac - $as_echo_n "checking LIBRARY... " >&6; } - if test -z "$LIBRARY" - then -- LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' -+ LIBRARY='libplatform-python$(VERSION)$(ABIFLAGS).a' - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 - $as_echo "$LIBRARY" >&6; } -@@ -5957,48 +5957,48 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h - - case $ac_sys_system in - CYGWIN*) -- LDLIBRARY='libpython$(LDVERSION).dll.a' -- DLLLIBRARY='libpython$(LDVERSION).dll' -+ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' -+ DLLLIBRARY='libplatfor-mpython$(LDVERSION).dll' - ;; - SunOS*) -- LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' -+ BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes - then -- PY3LIBRARY=libpython3.so -+ PY3LIBRARY=libplatform-python3.so - fi - ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) -- LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' -+ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes - then -- PY3LIBRARY=libpython3.so -+ PY3LIBRARY=libplatform-python3.so - fi - ;; - hp*|HP*) - case `uname -m` in - ia64) -- LDLIBRARY='libpython$(LDVERSION).so' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' - ;; - *) -- LDLIBRARY='libpython$(LDVERSION).sl' -+ LDLIBRARY='libplatform-python$(LDVERSION).sl' - ;; - esac -- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' - RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} - ;; - Darwin*) -- LDLIBRARY='libpython$(LDVERSION).dylib' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).dylib' -+ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' - RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} - ;; - AIX*) -- LDLIBRARY='libpython$(LDVERSION).so' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' - RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} - ;; - -@@ -6008,7 +6008,7 @@ else # shared is disabled - case $ac_sys_system in - CYGWIN*) - BLDLIBRARY='$(LIBRARY)' -- LDLIBRARY='libpython$(LDVERSION).dll.a' -+ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' - ;; - esac - fi -@@ -9448,7 +9448,7 @@ $as_echo "$CFLAGSFORSHARED" >&6; } - # For platforms on which shared libraries are not allowed to have unresolved - # symbols, this must be set to $(LIBS) (expanded by make). We do this even - # if it is not required, since it creates a dependency of the shared library --# to LIBS. This, in turn, means that applications linking the shared libpython -+# to LIBS. This, in turn, means that applications linking the shared libplatformpython - # don't need to link LIBS explicitly. The default should be only changed - # on systems where this approach causes problems. - -diff --git a/configure.ac b/configure.ac -index 74b0e57..bc8690a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -987,7 +987,7 @@ AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) - if test -z "$LIBRARY" - then -- LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' -+ LIBRARY='libplatform-python$(VERSION)$(ABIFLAGS).a' - fi - AC_MSG_RESULT($LIBRARY) - -@@ -1134,48 +1134,48 @@ if test $enable_shared = "yes"; then - AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) - case $ac_sys_system in - CYGWIN*) -- LDLIBRARY='libpython$(LDVERSION).dll.a' -- DLLLIBRARY='libpython$(LDVERSION).dll' -+ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' -+ DLLLIBRARY='libplatform-python$(LDVERSION).dll' - ;; - SunOS*) -- LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' -+ BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes - then -- PY3LIBRARY=libpython3.so -+ PY3LIBRARY=libplatform-python3.so - fi - ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) -- LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' -+ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes - then -- PY3LIBRARY=libpython3.so -+ PY3LIBRARY=libplatform-python3.so - fi - ;; - hp*|HP*) - case `uname -m` in - ia64) -- LDLIBRARY='libpython$(LDVERSION).so' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' - ;; - *) -- LDLIBRARY='libpython$(LDVERSION).sl' -+ LDLIBRARY='libplatform-python$(LDVERSION).sl' - ;; - esac -- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' - RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} - ;; - Darwin*) -- LDLIBRARY='libpython$(LDVERSION).dylib' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ LDLIBRARY='libplatform-python$(LDVERSION).dylib' -+ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' - RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} - ;; - AIX*) -- LDLIBRARY='libpython$(LDVERSION).so' -+ LDLIBRARY='libplatform-python$(LDVERSION).so' - RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} - ;; - -@@ -1185,7 +1185,7 @@ else # shared is disabled - case $ac_sys_system in - CYGWIN*) - BLDLIBRARY='$(LIBRARY)' -- LDLIBRARY='libpython$(LDVERSION).dll.a' -+ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' - ;; - esac - fi -@@ -2679,7 +2679,7 @@ AC_MSG_RESULT($CFLAGSFORSHARED) - # For platforms on which shared libraries are not allowed to have unresolved - # symbols, this must be set to $(LIBS) (expanded by make). We do this even - # if it is not required, since it creates a dependency of the shared library --# to LIBS. This, in turn, means that applications linking the shared libpython -+# to LIBS. This, in turn, means that applications linking the shared libplatformpython - # don't need to link LIBS explicitly. The default should be only changed - # on systems where this approach causes problems. - AC_SUBST(SHLIBS) diff --git a/platform-python.patch b/platform-python.patch new file mode 100644 index 0000000..34dafb7 --- /dev/null +++ b/platform-python.patch @@ -0,0 +1,445 @@ +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index 74de782..3752cb4 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -747,7 +747,7 @@ class build_ext(Command): + else: + from distutils import sysconfig + if sysconfig.get_config_var('Py_ENABLE_SHARED'): +- pythonlib = 'python{}.{}{}'.format( ++ pythonlib = 'platform-python{}.{}{}'.format( + sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, + sysconfig.get_config_var('ABIFLAGS')) + return ext.libraries + [pythonlib] +diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py +index ed44a93..84073f9 100644 +--- a/Lib/distutils/command/install.py ++++ b/Lib/distutils/command/install.py +@@ -29,9 +29,9 @@ WINDOWS_SCHEME = { + + INSTALL_SCHEMES = { + 'unix_prefix': { +- '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$abiflags/$dist_name', ++ 'purelib': '$base/lib/platform-python$py_version_short/site-packages', ++ 'platlib': '$platbase/lib/platform-python$py_version_short/site-packages', ++ 'headers': '$base/include/platform-python$py_version_short$abiflags/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, +@@ -59,7 +59,7 @@ if HAS_USER_SITE: + 'purelib': '$usersite', + 'platlib': '$usersite', + 'headers': +- '$userbase/include/python$py_version_short$abiflags/$dist_name', ++ '$userbase/include/platform-python$py_version_short$abiflags/$dist_name', + 'scripts': '$userbase/bin', + 'data' : '$userbase', + } +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 2013efa..bb265f7 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -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, +- "lib", "python" + get_python_version()) ++ "lib", "platform-python" + get_python_version()) + if standard_lib: + return libpython + else: +diff --git a/Lib/site.py b/Lib/site.py +index b5fe571..d3f9fd6 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -305,7 +305,7 @@ def getsitepackages(prefixes=None): + + if os.sep == '/': + sitepackages.append(os.path.join(prefix, "lib", +- "python%d.%d" % sys.version_info[:2], ++ "platform-python%d.%d" % sys.version_info[:2], + "site-packages")) + else: + sitepackages.append(prefix) +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 240bb66..c6962f2 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -20,14 +20,14 @@ __all__ = [ + + _INSTALL_SCHEMES = { + 'posix_prefix': { +- 'stdlib': '{installed_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', ++ 'stdlib': '{installed_base}/lib/platform-python{py_version_short}', ++ 'platstdlib': '{platbase}/lib/platform-python{py_version_short}', ++ 'purelib': '{base}/lib/platform-python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/lib/platform-python{py_version_short}/site-packages', + 'include': +- '{installed_base}/include/python{py_version_short}{abiflags}', ++ '{installed_base}/include/platform-python{py_version_short}{abiflags}', + 'platinclude': +- '{installed_platbase}/include/python{py_version_short}{abiflags}', ++ '{installed_platbase}/include/platform-python{py_version_short}{abiflags}', + 'scripts': '{base}/bin', + 'data': '{base}', + }, +@@ -61,11 +61,11 @@ _INSTALL_SCHEMES = { + 'data': '{userbase}', + }, + 'posix_user': { +- '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}', ++ 'stdlib': '{userbase}/lib/platform-python{py_version_short}', ++ 'platstdlib': '{userbase}/lib/platform-python{py_version_short}', ++ 'purelib': '{userbase}/lib/platform-python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/lib/platform-python{py_version_short}/site-packages', ++ 'include': '{userbase}/include/platform-python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', + }, +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 4f8c042..639f220 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -137,10 +137,10 @@ SCRIPTDIR= $(prefix)/lib64 + ABIFLAGS= @ABIFLAGS@ + + # Detailed destination directories +-BINLIBDEST= $(LIBDIR)/python$(VERSION) +-LIBDEST= $(SCRIPTDIR)/python$(VERSION) +-INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION) +-CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION) ++BINLIBDEST= $(LIBDIR)/platform-python$(VERSION) ++LIBDEST= $(SCRIPTDIR)/platform-python$(VERSION) ++INCLUDEPY= $(INCLUDEDIR)/platform-python$(LDVERSION) ++CONFINCLUDEPY= $(CONFINCLUDEDIR)/platform-python$(LDVERSION) + + # Symbols used for using shared libraries + SHLIB_SUFFIX= @SHLIB_SUFFIX@ +@@ -590,7 +590,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + $(AR) $(ARFLAGS) $@ $(MODOBJS) + $(RANLIB) $@ + +-libpython$(LDVERSION).so: $(LIBRARY_OBJS) ++libplatform-python$(LDVERSION).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + $(LN) -f $(INSTSONAME) $@; \ +@@ -598,14 +598,14 @@ libpython$(LDVERSION).so: $(LIBRARY_OBJS) + $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + fi + +-libpython3.so: libpython$(LDVERSION).so ++libplatform-python3.so: libplatform-python$(LDVERSION).so + $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ + +-libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) +- $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ ++libplatform-python$(LDVERSION).dylib: $(LIBRARY_OBJS) ++ $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libplatform-python$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + + +-libpython$(VERSION).sl: $(LIBRARY_OBJS) ++libplatform-python$(VERSION).sl: $(LIBRARY_OBJS) + $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST) + + # Copy up the gdb python hooks into a position where they can be automatically +@@ -643,7 +643,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ + + # This rule builds the Cygwin Python DLL and import library if configured + # for a shared core library; otherwise, this rule is a noop. +-$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) ++$(DLLLIBRARY) libplatform-python$(VERSION).dll.a: $(LIBRARY_OBJS) + if test -n "$(DLLLIBRARY)"; then \ + $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ + $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ +@@ -1485,12 +1485,12 @@ frameworkinstallstructure: $(LDLIBRARY) + # Install a number of symlinks to keep software that expects a normal unix + # install (which includes python-config) happy. + frameworkinstallmaclib: +- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a" +- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib" +- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a" +- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib" +- $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib" +- $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib" ++ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(LDVERSION).a" ++ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(LDVERSION).dylib" ++ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(VERSION).a" ++ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libplatform-python$(VERSION).dylib" ++ $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libplatformp-ython$(LDVERSION).dylib" ++ $(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libplatformp-ython$(VERSION).dylib" + + # This installs the IDE, the Launcher and other apps into /Applications + frameworkinstallapps: +diff --git a/Misc/python-config.in b/Misc/python-config.in +index e13da75..c45c4d8 100644 +--- a/Misc/python-config.in ++++ b/Misc/python-config.in +@@ -47,7 +47,7 @@ for opt in opt_flags: + print(' '.join(flags)) + + elif opt in ('--libs', '--ldflags'): +- libs = ['-lpython' + pyver + sys.abiflags] ++ libs = ['-lplatform-python' + pyver + sys.abiflags] + libs += getvar('LIBS').split() + libs += getvar('SYSLIBS').split() + # add the prefix/lib/pythonX.Y/config dir, but only if there is no +diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in +index 30c6927..6606322 100644 +--- a/Misc/python-config.sh.in ++++ b/Misc/python-config.sh.in +@@ -40,7 +40,7 @@ LIBM="@LIBM@" + LIBC="@LIBC@" + SYSLIBS="$LIBM $LIBC" + ABIFLAGS="@ABIFLAGS@" +-LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" ++LIBS="-lplatform-python${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS" + BASECFLAGS="@BASECFLAGS@" + LDLIBRARY="@LDLIBRARY@" + LINKFORSHARED="@LINKFORSHARED@" +@@ -51,8 +51,8 @@ LIBDEST=${prefix}/lib/python${VERSION} + LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#") + SO="@EXT_SUFFIX@" + PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" +-INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" +-PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" ++INCDIR="-I$includedir/platform-python${VERSION}${ABIFLAGS}" ++PLATINCDIR="-I$includedir/platform-python${VERSION}${ABIFLAGS}" + + # Scan for --help or unknown argument. + for ARG in $* +diff --git a/Misc/python.pc.in b/Misc/python.pc.in +index ae69867..c7bf798 100644 +--- a/Misc/python.pc.in ++++ b/Misc/python.pc.in +@@ -9,5 +9,5 @@ Description: Python library + Requires: + Version: @VERSION@ + Libs.private: @LIBS@ +-Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@ +-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ ++Libs: -L${libdir} -lplatform-python@VERSION@@ABIFLAGS@ ++Cflags: -I${includedir}/platform-python@VERSION@@ABIFLAGS@ +diff --git a/Modules/getpath.c b/Modules/getpath.c +index c4055be..248d654 100644 +--- a/Modules/getpath.c ++++ b/Modules/getpath.c +@@ -494,7 +494,7 @@ calculate_path(void) + _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); + _prefix = Py_DecodeLocale(PREFIX, NULL); + _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); +- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); ++ lib_python = Py_DecodeLocale("lib/platform-python" VERSION, NULL); + + if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { + Py_FatalError( +diff --git a/Modules/makesetup b/Modules/makesetup +index 8db8de8..3d6a3d0 100755 +--- a/Modules/makesetup ++++ b/Modules/makesetup +@@ -92,7 +92,7 @@ CYGWIN*) if test $libdir = . + else + ExtraLibDir='$(LIBPL)' + fi +- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";; ++ ExtraLibs="-L$ExtraLibDir -lplatform-python\$(VERSION)";; + esac + + # Main loop +diff --git a/configure b/configure +index eea17a4..335722f 100755 +--- a/configure ++++ b/configure +@@ -5733,7 +5733,7 @@ esac + $as_echo_n "checking LIBRARY... " >&6; } + if test -z "$LIBRARY" + then +- LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' ++ LIBRARY='libplatform-python$(VERSION)$(ABIFLAGS).a' + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 + $as_echo "$LIBRARY" >&6; } +@@ -5949,48 +5949,48 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h + + case $ac_sys_system in + CYGWIN*) +- LDLIBRARY='libpython$(LDVERSION).dll.a' +- DLLLIBRARY='libpython$(LDVERSION).dll' ++ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' ++ DLLLIBRARY='libplatfor-mpython$(LDVERSION).dll' + ;; + SunOS*) +- LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' ++ BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes + then +- PY3LIBRARY=libpython3.so ++ PY3LIBRARY=libplatform-python3.so + fi + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) +- LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' ++ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes + then +- PY3LIBRARY=libpython3.so ++ PY3LIBRARY=libplatform-python3.so + fi + ;; + hp*|HP*) + case `uname -m` in + ia64) +- LDLIBRARY='libpython$(LDVERSION).so' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' + ;; + *) +- LDLIBRARY='libpython$(LDVERSION).sl' ++ LDLIBRARY='libplatform-python$(LDVERSION).sl' + ;; + esac +- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' + RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} + ;; + Darwin*) +- LDLIBRARY='libpython$(LDVERSION).dylib' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).dylib' ++ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' + RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} + ;; + AIX*) +- LDLIBRARY='libpython$(LDVERSION).so' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' + RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} + ;; + +@@ -6000,7 +6000,7 @@ else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' +- LDLIBRARY='libpython$(LDVERSION).dll.a' ++ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' + ;; + esac + fi +@@ -9440,7 +9440,7 @@ $as_echo "$CFLAGSFORSHARED" >&6; } + # For platforms on which shared libraries are not allowed to have unresolved + # symbols, this must be set to $(LIBS) (expanded by make). We do this even + # if it is not required, since it creates a dependency of the shared library +-# to LIBS. This, in turn, means that applications linking the shared libpython ++# to LIBS. This, in turn, means that applications linking the shared libplatformpython + # don't need to link LIBS explicitly. The default should be only changed + # on systems where this approach causes problems. + +diff --git a/configure.ac b/configure.ac +index 74b0e57..bc8690a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -987,7 +987,7 @@ AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) + if test -z "$LIBRARY" + then +- LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' ++ LIBRARY='libplatform-python$(VERSION)$(ABIFLAGS).a' + fi + AC_MSG_RESULT($LIBRARY) + +@@ -1134,48 +1134,48 @@ if test $enable_shared = "yes"; then + AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) + case $ac_sys_system in + CYGWIN*) +- LDLIBRARY='libpython$(LDVERSION).dll.a' +- DLLLIBRARY='libpython$(LDVERSION).dll' ++ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' ++ DLLLIBRARY='libplatform-python$(LDVERSION).dll' + ;; + SunOS*) +- LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' ++ BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes + then +- PY3LIBRARY=libpython3.so ++ PY3LIBRARY=libplatform-python3.so + fi + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) +- LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' ++ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes + then +- PY3LIBRARY=libpython3.so ++ PY3LIBRARY=libplatform-python3.so + fi + ;; + hp*|HP*) + case `uname -m` in + ia64) +- LDLIBRARY='libpython$(LDVERSION).so' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' + ;; + *) +- LDLIBRARY='libpython$(LDVERSION).sl' ++ LDLIBRARY='libplatform-python$(LDVERSION).sl' + ;; + esac +- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lplatform-python$(LDVERSION)' + RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} + ;; + Darwin*) +- LDLIBRARY='libpython$(LDVERSION).dylib' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ LDLIBRARY='libplatform-python$(LDVERSION).dylib' ++ BLDLIBRARY='-L. -lplatform-python$(LDVERSION)' + RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} + ;; + AIX*) +- LDLIBRARY='libpython$(LDVERSION).so' ++ LDLIBRARY='libplatform-python$(LDVERSION).so' + RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} + ;; + +@@ -1185,7 +1185,7 @@ else # shared is disabled + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' +- LDLIBRARY='libpython$(LDVERSION).dll.a' ++ LDLIBRARY='libplatform-python$(LDVERSION).dll.a' + ;; + esac + fi +@@ -2679,7 +2679,7 @@ AC_MSG_RESULT($CFLAGSFORSHARED) + # For platforms on which shared libraries are not allowed to have unresolved + # symbols, this must be set to $(LIBS) (expanded by make). We do this even + # if it is not required, since it creates a dependency of the shared library +-# to LIBS. This, in turn, means that applications linking the shared libpython ++# to LIBS. This, in turn, means that applications linking the shared libplatformpython + # don't need to link LIBS explicitly. The default should be only changed + # on systems where this approach causes problems. + AC_SUBST(SHLIBS) diff --git a/platform-python.spec b/platform-python.spec index ca02230..5658571 100644 --- a/platform-python.spec +++ b/platform-python.spec @@ -201,6 +201,8 @@ Source3: macros.pybytecompile-%{name} # Written by bkabrda Source8: check-pyc-and-pyo-timestamps.py +Patch0: platform-python.patch + # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Was Patch0 in ivazquez' python3000 specfile: Patch1: Python-3.1.1-rpath.patch @@ -402,8 +404,6 @@ Patch270: 00270-fix-ssl-alpn-hook-test.patch # Reported upstream: http://bugs.python.org/issue31034 Patch271: 00271-asyncio-get-default-signal-handler.patch -Patch2000: 02000-platform-python.patch - # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora, EL, etc., @@ -579,6 +579,9 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en # # Apply patches: # + +%patch0 -p1 + %patch1 -p1 %if "%{_lib}" == "lib64" @@ -617,10 +620,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch271 -p1 %patch272 -p1 - -# Platform python specific patch -%patch2000 -p1 - # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # are many differences between 2.6 and the Python 3 library. #