=== modified file 'Lib/distutils/sysconfig.py' --- Lib/distutils/sysconfig.py 2010-10-10 09:37:12 +0000 +++ Lib/distutils/sysconfig.py 2010-10-18 18:51:14 +0000 @@ -49,6 +49,18 @@ return False python_build = _python_build() +# Calculate the build qualifier flags if they are defined. Adding the flags +# to the include and lib directories only makes sense for an installation, not +# an in-source build. +build_flags = '' +try: + if not python_build: + build_flags = sys.abiflags +except AttributeError: + # It's not a configure-based build, so the sys module doesn't have + # this attribute, which is fine. + pass + def get_python_version(): """Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' @@ -83,7 +95,8 @@ else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) - return os.path.join(prefix, "include", "python" + get_python_version()) + python_dir = 'python' + get_python_version() + build_flags + return os.path.join(prefix, "include", python_dir) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": @@ -224,7 +237,7 @@ """Return full pathname of installed Makefile from the Python build.""" if python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + build_flags return os.path.join(lib_dir, "config", "Makefile") === modified file 'Lib/sysconfig.py' --- Lib/sysconfig.py 2010-10-14 21:15:17 +0000 +++ Lib/sysconfig.py 2010-10-18 18:51:14 +0000 @@ -21,12 +21,14 @@ _INSTALL_SCHEMES = { 'posix_prefix': { - 'stdlib': '{base}/lib/python{py_version_short}', + 'stdlib': '{base}/lib/python{py_version_short}{abiflags}', '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}', + 'include': + '{base}/include/python{py_version_short}{abiflags}', + 'platinclude': + '{platbase}/include/python{py_version_short}{abiflags}', 'scripts': '{base}/bin', 'data': '{base}', }, @@ -79,7 +81,8 @@ 'data' : '{userbase}', }, 'posix_user': { - 'stdlib': '{userbase}/lib/python{py_version_short}', + 'stdlib': + '{userbase}/lib/python{py_version_short}{abiflags}', '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', @@ -470,6 +473,7 @@ _CONFIG_VARS['base'] = _PREFIX _CONFIG_VARS['platbase'] = _EXEC_PREFIX _CONFIG_VARS['projectbase'] = _PROJECT_BASE + _CONFIG_VARS['abiflags'] = sys.abiflags if os.name in ('nt', 'os2'): _init_non_posix(_CONFIG_VARS) === modified file 'Makefile.pre.in' --- Makefile.pre.in 2010-10-16 10:36:11 +0000 +++ Makefile.pre.in 2010-10-18 18:51:14 +0000 @@ -108,9 +108,9 @@ # Detailed destination directories BINLIBDEST= $(LIBDIR)/python$(VERSION) LIBDEST= $(SCRIPTDIR)/python$(VERSION) -INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) -CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION) -LIBP= $(LIBDIR)/python$(VERSION) +INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)$(ABIFLAGS) +CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)$(ABIFLAGS) +LIBP= $(LIBDIR)/python$(VERSION)$(ABIFLAGS) # Symbols used for using shared libraries SO= @SO@ @@ -834,7 +834,7 @@ else true; \ fi; \ done - $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) + $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(ABIFLAGS)$(EXE) if test -f $(LDLIBRARY); then \ if test -n "$(DLLLIBRARY)" ; then \ $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ @@ -852,8 +852,11 @@ then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \ else true; \ fi + (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(ABIFLAGS)$(EXE) python$(VERSION)$(EXE)) (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE)) -rm -f $(DESTDIR)$(BINDIR)/python3-config + -rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(ABIFLAGS)-config python$(VERSION)-config) (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config) -rm -f $(DESTDIR)$(LIBPC)/python3.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) @@ -986,7 +989,7 @@ python-config: $(srcdir)/Misc/python-config.in # Substitution happens here, as the completely-expanded BINDIR # is not available in configure - sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config + sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(ABIFLAGS)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config # Install the include files INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) @@ -1044,7 +1047,7 @@ $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh - $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config + $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)$(ABIFLAGS)-config rm python-config @if [ -s Modules/python.exp -a \ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ === modified file 'configure' --- configure 2010-10-17 19:36:54 +0000 +++ configure 2010-10-18 18:51:55 +0000 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 85559 . +# From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for python 3.2. #