+++ /dev/null
-distutils: fix build_ext check to find whether we're building Python or not
-
-The build_ext logic uses
-sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to
-determine whether we're building a third-party Python extension, or a
-built-in Python extension. However, this check is wrong in
-cross-compilation mode, and instead, the sysconfig.python_build
-variable should be used.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Index: b/Lib/distutils/command/build_ext.py
-===================================================================
---- a/Lib/distutils/command/build_ext.py
-+++ b/Lib/distutils/command/build_ext.py
-@@ -237,7 +237,7 @@
- # Python's library directory must be appended to library_dirs
- # See Issues: #1600860, #4366
- if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
-- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
-+ if not sysconfig.python_build:
- # building third party extensions
- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
- else:
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -558,6 +558,9 @@
+@@ -559,6 +559,9 @@
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
-@@ -1196,7 +1199,7 @@
+@@ -1197,7 +1200,7 @@
else true; \
fi; \
done
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
-@@ -1206,6 +1209,11 @@
+@@ -1207,6 +1210,11 @@
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
done
@for d in $(LIBSUBDIRS); \
do \
a=$(srcdir)/Lib/$$d; \
-@@ -1529,7 +1537,7 @@
+@@ -1533,7 +1541,7 @@
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
find build -name '*.py' -exec rm -f {} ';' || true
find build -name '*.py[co]' -exec rm -f {} ';' || true
# Environment to run shared python without installed libraries
RUNSHARED= @RUNSHARED@
-@@ -1246,21 +1249,21 @@
+@@ -1247,21 +1250,21 @@
fi
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1247,24 +1247,32 @@
+@@ -1248,24 +1248,32 @@
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -3429,7 +3429,7 @@
+@@ -3432,7 +3432,7 @@
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
# Subdirectories with code
SRCDIRS= @SRCDIRS@
-@@ -576,6 +578,7 @@
+@@ -577,6 +579,7 @@
esac; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
# Build static library
-@@ -1386,7 +1389,8 @@
+@@ -1387,7 +1390,8 @@
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2366,6 +2366,8 @@
+@@ -2369,6 +2369,8 @@
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+ PKG_PROG_PKG_CONFIG
+AC_SUBST(DISABLED_EXTENSIONS)
+
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -467,10 +467,10 @@
+@@ -456,10 +456,10 @@
if not cross_compiling:
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
-diff -Nuar Python-3.4.1-orig/Modules/termios.c Python-3.4.1/Modules/termios.c
---- Python-3.4.1-orig/Modules/termios.c 2014-05-19 08:19:39.000000000 +0300
-+++ Python-3.4.1/Modules/termios.c 2014-08-06 21:16:11.892362933 +0300
+Index: b/Modules/termios.c
+===================================================================
+--- a/Modules/termios.c
++++ b/Modules/termios.c
@@ -9,7 +9,9 @@
#endif
Misc/python-config.sh.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
-diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
-index 64c81e5..f75eec5 100644
+Index: b/Misc/python-config.sh.in
+===================================================================
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
-@@ -29,12 +29,12 @@ prefix_real=$(installed_prefix "$0")
+@@ -29,12 +29,12 @@
# Use sed to fix paths from their built-to locations to their installed-to
# locations.
VERSION="@VERSION@"
LIBM="@LIBM@"
LIBC="@LIBC@"
-@@ -48,7 +48,7 @@ OPT="@OPT@"
+@@ -48,7 +48,7 @@
PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
LDVERSION="@LDVERSION@"
LIBDEST=${prefix}/lib/python${VERSION}
SO="@SO@"
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
---
-2.1.3
-
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -1287,7 +1287,6 @@
+@@ -1276,7 +1276,6 @@
panel_library = 'panel'
if curses_library == 'ncursesw':
curses_defines.append(('HAVE_NCURSESW', '1'))
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1135,8 +1135,30 @@
+@@ -1136,8 +1136,30 @@
EXTRAPLATDIR= @EXTRAPLATDIR@
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
-@@ -1163,28 +1185,22 @@
+@@ -1164,28 +1186,22 @@
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2673,6 +2673,12 @@
+@@ -2676,6 +2676,12 @@
fi
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1102,7 +1102,9 @@
+@@ -1103,7 +1103,9 @@
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
-@@ -1153,7 +1155,7 @@
+@@ -1154,7 +1156,7 @@
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test test/test_asyncio \
-@@ -1197,6 +1199,10 @@
+@@ -1198,6 +1200,10 @@
test/test_importlib/import_ test/test_importlib/source \
unittest/test unittest/test/testmock
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2672,6 +2672,11 @@
+@@ -2675,6 +2675,11 @@
AC_CHECK_FUNCS(pthread_atfork)
fi
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -2212,6 +2212,12 @@
+@@ -2200,6 +2200,12 @@
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
-@@ -2236,8 +2242,7 @@
+@@ -2224,8 +2230,7 @@
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1106,7 +1106,9 @@
+@@ -1107,7 +1107,9 @@
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
-@@ -1146,7 +1148,6 @@
+@@ -1147,7 +1149,6 @@
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
-@@ -1188,9 +1189,6 @@
+@@ -1189,9 +1190,6 @@
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
sqlite3/test \
ctypes/test \
idlelib/idle_test \
distutils/tests \
-@@ -1203,6 +1201,14 @@
+@@ -1204,6 +1202,14 @@
LIBSUBDIRS += pydoc_data
endif
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
-@@ -1298,10 +1304,12 @@
+@@ -1299,10 +1305,12 @@
-d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
endif
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -2213,10 +2213,11 @@
+@@ -2201,10 +2201,11 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2684,6 +2684,12 @@
+@@ -2687,6 +2687,12 @@
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2672,6 +2672,15 @@
+@@ -2675,6 +2675,15 @@
AC_CHECK_FUNCS(pthread_atfork)
fi
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1146,7 +1146,6 @@
+@@ -1147,7 +1147,6 @@
email email/mime \
ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
-@@ -1188,7 +1187,6 @@
+@@ -1189,7 +1188,6 @@
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
ctypes/test \
idlelib/idle_test \
distutils/tests \
-@@ -1209,6 +1207,11 @@
+@@ -1210,6 +1208,11 @@
lib2to3/tests/data/fixers/myfixes
endif
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1139,7 +1139,7 @@
+@@ -1140,7 +1140,7 @@
EXTRAPLATDIR= @EXTRAPLATDIR@
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
site-packages \
asyncio \
collections concurrent concurrent/futures encodings \
-@@ -1157,8 +1157,7 @@
+@@ -1158,8 +1158,7 @@
venv venv/scripts venv/scripts/posix \
curses $(MACHDEPS)
test/test_email test/test_email/data \
test/test_json \
test/audiodata \
-@@ -1212,6 +1211,12 @@
+@@ -1213,6 +1212,12 @@
TESTSUBDIRS += sqlite3/test
endif
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2681,6 +2681,15 @@
+@@ -2684,6 +2684,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1155,7 +1155,7 @@
+@@ -1156,7 +1156,7 @@
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
TESTSUBDIRS = test test/test_asyncio \
test/test_email test/test_email/data \
-@@ -1217,6 +1217,10 @@
+@@ -1218,6 +1218,10 @@
tkinter/test/test_ttk
endif
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2690,6 +2690,15 @@
+@@ -2693,6 +2693,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1149,7 +1149,7 @@
+@@ -1150,7 +1150,7 @@
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
importlib \
turtledemo \
multiprocessing multiprocessing/dummy \
-@@ -1221,6 +1221,10 @@
+@@ -1222,6 +1222,10 @@
LIBSUBDIRS += curses
endif
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2369,13 +2369,21 @@
+@@ -2372,13 +2372,21 @@
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -1426,7 +1426,7 @@
+@@ -1414,7 +1414,7 @@
#
# More information on Expat can be found at www.libexpat.org.
#
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2689,6 +2689,12 @@
+@@ -2692,6 +2692,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2695,6 +2695,12 @@
+@@ -2698,6 +2698,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2701,6 +2701,12 @@
+@@ -2704,6 +2704,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1100,7 +1100,9 @@
+@@ -1101,7 +1101,9 @@
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
-@@ -1148,7 +1150,6 @@
+@@ -1149,7 +1151,6 @@
html json http dbm xmlrpc \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
distutils distutils/command \
importlib \
turtledemo \
-@@ -1225,6 +1226,10 @@
+@@ -1226,6 +1227,10 @@
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2743,6 +2743,12 @@
+@@ -2746,6 +2746,12 @@
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -2213,11 +2213,13 @@
+@@ -2201,11 +2201,13 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2402,13 +2402,20 @@
+@@ -2405,13 +2405,20 @@
AC_MSG_RESULT($with_system_ffi)
# Check for use of the system libmpdec library
===================================================================
--- a/setup.py
+++ b/setup.py
-@@ -1980,7 +1980,7 @@
+@@ -1968,7 +1968,7 @@
def _decimal_ext(self):
extra_compile_args = []
undef_macros = []
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -2417,6 +2417,12 @@
+@@ -2420,6 +2420,12 @@
fi
AC_SUBST(MPDEC)
################################################################################
PYTHON3_VERSION_MAJOR = 3.4
-PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).2
+PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).3
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python software foundation license v2, others