linux-headers: bump 4.{4, 9}.x series
[buildroot-gz.git] / package / python3 / 0003-Make-the-build-of-pyc-files-conditional.patch
blob3251da5f3e6be19c14b9504d2c3bf796c88608ab
1 From 28f81597314ea3ed03935b519453a55cf6c3c20d Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 23 Dec 2015 11:29:35 +0100
4 Subject: [PATCH] Make the build of pyc files conditional
6 This commit adds a new configure option --disable-pyc-build to disable
7 the compilation of pyc.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 ---
11 Makefile.pre.in | 2 ++
12 configure.ac | 6 ++++++
13 2 files changed, 8 insertions(+)
15 diff --git a/Makefile.pre.in b/Makefile.pre.in
16 index 4d2a061..272f312 100644
17 --- a/Makefile.pre.in
18 +++ b/Makefile.pre.in
19 @@ -1283,6 +1283,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
20 $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
21 $(DESTDIR)$(LIBDEST)/distutils/tests ; \
23 +ifeq (@PYC_BUILD@,yes)
24 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
25 $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
26 -d $(LIBDEST) -f \
27 @@ -1310,6 +1311,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
28 $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
29 -d $(LIBDEST)/site-packages -f \
30 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
31 +endif
32 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
33 $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
34 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
35 diff --git a/configure.ac b/configure.ac
36 index 76b70a0..66d4642 100644
37 --- a/configure.ac
38 +++ b/configure.ac
39 @@ -1056,6 +1056,12 @@ fi
41 AC_MSG_CHECKING(LDLIBRARY)
43 +AC_SUBST(PYC_BUILD)
45 +AC_ARG_ENABLE(pyc-build,
46 + AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
47 + [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
49 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
50 # library that we build, but we do not want to link against it (we
51 # will find it with a -framework option). For this reason there is an
52 --
53 2.6.4