diff -dur Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/distutils/command/install.py --- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-15 20:16:35.526223992 +0200 +++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-15 20:17:09.131071575 +0200 @@ -48,14 +48,14 @@ INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', + 'purelib': '$base/share/python$py_version_short/site-packages', 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, 'unix_home': { - 'purelib': '$base/lib/python', + 'purelib': '$base/share/python', 'platlib': '$base/'+libname+'/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', diff -dur Python-3.2.1.orig/Lib/distutils/sysconfig.py Python-3.2.1/Lib/distutils/sysconfig.py --- Python-3.2.1.orig/Lib/distutils/sysconfig.py 2011-07-15 20:16:35.526223992 +0200 +++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-15 20:17:09.131071575 +0200 @@ -124,12 +124,12 @@ prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": - if plat_specific: - lib = sys.lib + if plat_specific: + libpython = os.path.join(prefix, + sys.lib, "python" + get_python_version()) else: - lib = 'lib' - libpython = os.path.join(prefix, - lib, "python" + get_python_version()) + libpython = os.path.join(prefix, + "share", "python" + get_python_version()) if standard_lib: return libpython else: diff -dur Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib/distutils/tests/test_install.py --- Python-3.2.1.orig/Lib/distutils/tests/test_install.py 2011-07-15 20:16:35.529557475 +0200 +++ Python-3.2.1/Lib/distutils/tests/test_install.py 2011-07-15 20:17:09.131071575 +0200 @@ -48,7 +48,7 @@ expected = os.path.normpath(expected) self.assertEqual(got, expected) - libdir = os.path.join(destination, "lib", "python") + libdir = os.path.join(destination, "share", "python") platlibdir = os.path.join(destination, sys.lib, "python") check_path(cmd.install_lib, libdir) check_path(cmd.install_platlib, platlibdir) diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py --- Python-3.2.1.orig/Lib/site.py 2011-07-15 20:16:35.529557475 +0200 +++ Python-3.2.1/Lib/site.py 2011-07-15 20:17:09.134405059 +0200 @@ -289,8 +289,7 @@ "python" + sys.version[:3], "site-packages")) sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) - if sys.lib != 'lib': - sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py --- Python-3.2.1.orig/Lib/sysconfig.py 2011-07-15 20:16:35.532890958 +0200 +++ Python-3.2.1/Lib/sysconfig.py 2011-07-15 20:18:27.267925241 +0200 @@ -23,7 +23,7 @@ 'posix_prefix': { 'stdlib': '{base}/' + sys.lib + '/python{py_version_short}', 'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', + 'purelib': '{base}/share/python{py_version_short}/site-packages', 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', 'include': '{base}/include/python{py_version_short}{abiflags}', --- Python-3.5.0/configure.ac~ 2015-09-13 20:18:04.000000000 +0200 +++ Python-3.5.0/configure.ac 2015-09-13 20:21:35.887422670 +0200 @@ -4370,7 +4370,7 @@ AC_MSG_RESULT($LDVERSION) dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) -LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" +LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" AC_SUBST(LIBPL) # Check whether right shifting a negative integer extends the sign bit diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in --- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 20:16:35.532890958 +0200 +++ Python-3.2.1/Makefile.pre.in 2011-07-15 20:17:09.134405059 +0200 @@ -108,7 +108,7 @@ MANDIR= @mandir@ INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include -SCRIPTDIR= $(prefix)/$(LIB) +SCRIPTDIR= $(prefix)/share ABIFLAGS= @ABIFLAGS@ # Detailed destination directories @@ -1065,8 +1065,8 @@ if test "$(SO)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ else \ - $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ - $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ + $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c --- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 20:16:35.536224442 +0200 +++ Python-3.2.1/Modules/getpath.c 2011-07-15 20:17:09.137738543 +0200 @@ -131,7 +131,8 @@ #ifndef PYTHONPATH #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \ - EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" + EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \ + PREFIX "/share/python" VERSION #endif #ifndef LANDMARK @@ -673,13 +674,13 @@ calculate_path(void) } } - pfound = search_for_prefix(argv0_path, home, _prefix, lib_python); + pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python" VERSION); if (!pfound) { if (!Py_FrozenFlag) fprintf(stderr, "Could not find platform independent libraries \n"); wcsncpy(prefix, _prefix, MAXPATHLEN); - joinpath(prefix, lib_python); + joinpath(prefix, L"share/python"); } else reduce(prefix); @@ -691,7 +692,7 @@ } else wcsncpy(zip_path, _prefix, MAXPATHLEN); - joinpath(zip_path, L"lib/python00.zip"); + joinpath(zip_path, L"" LIB_PYTHON "00.zip"); bufsz = wcslen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2];