Commit 5c63280c authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

python3: switch to Git formatted patches



In preparation for the bump to Python 3.5.0, let's switch all the
patches to the Git format. This way, a Git repository of the Python
source code can be used to manage those patches, which makes it easier
to bump to newer Python versions.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 6fc5de4e
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
setup.py: do not add invalid header locations
From 03a4c313f42ea1bbdfc4c64a285b3930766c2b23 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:28:34 +0100
Subject: [PATCH] setup.py: do not add invalid header locations

This piece of code incorrectly adds /usr/include to
self.compiler.include_dirs, and results in the following invalid
@@ -20,11 +23,15 @@ The -I/usr/include is wrong when cross compiling, so we disable adding
INCLUDEDIR and LIBDIR from the host when cross compiling.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
---
 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 2779658..d3bf8e5 100644
--- a/setup.py
+++ b/setup.py
@@ -493,7 +493,8 @@
@@ -493,7 +493,8 @@ class PyBuildExt(build_ext):
                         add_dir_to_list(dir_list, directory)
 
         if os.path.normpath(sys.base_prefix) != '/usr' \
@@ -34,3 +41,6 @@ Index: b/setup.py
             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
             # building a framework with different architectures than
-- 
2.6.4
+20 −10
Original line number Diff line number Diff line
Change the install location of _sysconfigdata.py
From 2f706a2ba92c88f1c8288e34d1937b6ba0e0214c Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:04 +0100
Subject: [PATCH] Change the install location of _sysconfigdata.py

The _sysconfigdata.py module contains definitions that are needed when
building Python modules. In cross-compilation mode, when building
@@ -16,12 +19,16 @@ this directory gets added to the PYTHONPATH of the host Python
interpreter when building Python modules for the target.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile.pre.in | 12 ++++++++++--
 configure.ac    |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

Index: b/Makefile.pre.in
===================================================================
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 76aef28..58dab28 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -559,6 +559,9 @@
@@ -559,6 +559,9 @@ pybuilddir.txt: $(BUILDPYTHON)
 		rm -f ./pybuilddir.txt ; \
 		exit 1 ; \
 	fi
@@ -31,7 +38,7 @@ Index: b/Makefile.pre.in
 
 # Build the shared modules
 # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -1197,7 +1200,7 @@
@@ -1197,7 +1200,7 @@ libinstall:	build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
 		else	true; \
 		fi; \
 	done
@@ -40,7 +47,7 @@ Index: b/Makefile.pre.in
 	do \
 		if test -x $$i; then \
 			$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1207,6 +1210,11 @@
@@ -1207,6 +1210,11 @@ libinstall:	build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
 			echo $(INSTALL_DATA) $$i $(LIBDEST); \
 		fi; \
 	done
@@ -52,7 +59,7 @@ Index: b/Makefile.pre.in
 	@for d in $(LIBSUBDIRS); \
 	do \
 		a=$(srcdir)/Lib/$$d; \
@@ -1533,7 +1541,7 @@
@@ -1533,7 +1541,7 @@ clean: pycremoval
 	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
@@ -61,11 +68,11 @@ Index: b/Makefile.pre.in
 	-rm -f Lib/lib2to3/*Grammar*.pickle
 	-rm -f Modules/_testembed Modules/_freeze_importlib
 
Index: b/configure.ac
===================================================================
diff --git a/configure.ac b/configure.ac
index a0d0afa..7b491b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@
@@ -70,7 +70,7 @@ if test "$cross_compiling" = yes; then
 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
 	fi
         AC_MSG_RESULT($interp)
@@ -74,3 +81,6 @@ Index: b/configure.ac
     fi
 elif test "$cross_compiling" = maybe; then
     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
-- 
2.6.4
+24 −6
Original line number Diff line number Diff line
Index: b/Makefile.pre.in
===================================================================
From 7c5338161263c290f18b1ff90859084d314be98c Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:35 +0100
Subject: [PATCH] Make the build of pyc and pyo files conditional

This commit adds two new configure options: --disable-pyc-build and
--disable-pyo-build to disable the compilation of pyc and pyo files
respectively.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile.pre.in |  8 ++++++++
 configure.ac    | 12 ++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/Makefile.pre.in b/Makefile.pre.in
index 58dab28..f1bdd99 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1248,24 +1248,32 @@
@@ -1245,24 +1245,32 @@ libinstall:	build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
 	fi
@@ -35,11 +50,11 @@ Index: b/Makefile.pre.in
 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
Index: b/configure.ac
===================================================================
diff --git a/configure.ac b/configure.ac
index 7b491b4..f2c4705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -939,6 +939,18 @@
@@ -922,6 +922,18 @@ fi
 
 AC_MSG_CHECKING(LDLIBRARY)
 
@@ -58,3 +73,6 @@ Index: b/configure.ac
 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
 # library that we build, but we do not want to link against it (we
 # will find it with a -framework option). For this reason there is an
-- 
2.6.4
+27 −0
Original line number Diff line number Diff line
Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support

Signed-off-by: Vanya Sergeev <vsergeev at gmail.com>
From ef95d6a49f17522ed120def8093fa2fc0b86cbc8 Mon Sep 17 00:00:00 2001
From: Vanya Sergeev <vsergeev@gmail.com>
Date: Wed, 23 Dec 2015 11:30:33 +0100
Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling
 with IPv6 support

Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/configure.ac
===================================================================
diff --git a/configure.ac b/configure.ac
index f2c4705..6342b81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3432,7 +3432,7 @@
@@ -3415,7 +3415,7 @@ fi
 
 AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
 
@@ -19,3 +22,6 @@ Index: b/configure.ac
 then
 	if test $ipv6 = yes
 	then
-- 
2.6.4
+22 −16
Original line number Diff line number Diff line
Add infrastructure to disable the build of certain extensions
From 9eb1076b61e83647028a2f6b665b6f9afcb793b0 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:31:08 +0100
Subject: [PATCH] Add infrastructure to disable the build of certain extensions

Some of the extensions part of the Python core have dependencies on
external libraries (sqlite, tk, etc.) or are relatively big and not
@@ -33,16 +36,16 @@ then extended by Thomas Petazzoni

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile.pre.in |    4 ++++
 Makefile.pre.in | 6 +++++-
 configure.ac    | 2 ++
 setup.py        | 5 ++++-
 3 files changed, 10 insertions(+), 1 deletion(-)
 3 files changed, 11 insertions(+), 2 deletions(-)

Index: b/Makefile.pre.in
===================================================================
diff --git a/Makefile.pre.in b/Makefile.pre.in
index f1bdd99..e0f9e0f 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -180,6 +180,8 @@
@@ -177,6 +177,8 @@ FILEMODE=	644
 # configure script arguments
 CONFIG_ARGS=	@CONFIG_ARGS@
 
@@ -51,7 +54,7 @@ Index: b/Makefile.pre.in
 
 # Subdirectories with code
 SRCDIRS= 	@SRCDIRS@
@@ -577,6 +579,7 @@
@@ -574,6 +576,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
 	esac; \
 	$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
 		_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
@@ -59,7 +62,7 @@ Index: b/Makefile.pre.in
 		$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
 
 # Build static library
@@ -1387,7 +1390,8 @@
@@ -1384,7 +1387,8 @@ libainstall:	all python-config
 # Install the dynamically loadable modules
 # This goes into $(exec_prefix)
 sharedinstall: sharedmods
@@ -69,11 +72,11 @@ Index: b/Makefile.pre.in
 	   	--prefix=$(prefix) \
 		--install-scripts=$(BINDIR) \
 		--install-platlib=$(DESTSHARED) \
Index: b/configure.ac
===================================================================
diff --git a/configure.ac b/configure.ac
index 6342b81..a3026b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2369,6 +2369,8 @@
@@ -2352,6 +2352,8 @@ LIBS="$withval $LIBS"
 
 PKG_PROG_PKG_CONFIG
 
@@ -82,11 +85,11 @@ Index: b/configure.ac
 # Check for use of the system expat library
 AC_MSG_CHECKING(for --with-system-expat)
 AC_ARG_WITH(system_expat,
Index: b/setup.py
===================================================================
diff --git a/setup.py b/setup.py
index d3bf8e5..2a504d2 100644
--- a/setup.py
+++ b/setup.py
@@ -39,7 +39,10 @@
@@ -39,7 +39,10 @@ host_platform = get_platform()
 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
 
 # This global variable is used to hold the list of modules to be disabled.
@@ -98,3 +101,6 @@ Index: b/setup.py
 
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (after any relative
-- 
2.6.4
Loading