summaryrefslogtreecommitdiffstats
path: root/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-01-04 19:23:28 +0100
committerPeter Korsgaard <peter@korsgaard.com>2016-01-05 00:14:15 +0100
commit5c63280caf23ca7438e2fe23586cca9f450fc936 (patch)
tree0e3bf7672070a5bb06d298b2d01abe61caf0c085 /package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch
parent6fc5de4ef466b649b37a86e4f4994a667149dd80 (diff)
downloadbuildroot-5c63280caf23ca7438e2fe23586cca9f450fc936.tar.gz
buildroot-5c63280caf23ca7438e2fe23586cca9f450fc936.zip
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: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch')
-rw-r--r--package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch b/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch
new file mode 100644
index 0000000000..03684afec5
--- /dev/null
+++ b/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch
@@ -0,0 +1,78 @@
+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
+@@ -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
++ifeq (@PYC_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYO_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYC_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
++ifeq (@PYO_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+diff --git a/configure.ac b/configure.ac
+index 7b491b4..f2c4705 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -922,6 +922,18 @@ fi
+
+ AC_MSG_CHECKING(LDLIBRARY)
+
++AC_SUBST(PYC_BUILD)
++
++AC_ARG_ENABLE(pyc-build,
++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
++
++AC_SUBST(PYO_BUILD)
++
++AC_ARG_ENABLE(pyo-build,
++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]),
++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ])
++
+ # 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
+
OpenPOWER on IntegriCloud