packages/lang/python/patches/130-do-not-compile-tests-at-build.patch
Alexandru Ardelean 7c4dac5118 python: reduce size of patch 130
Try to reduce the amount of change in this patch, since it removes
a lot of stuff, when we could just 'ifdef' that stuff out, with 2 lines.

The buildroot project does something similar like this:
http://git.buildroot.net/buildroot/tree/package/python/005-pyc-pyo-conditional.patch

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-02-27 18:11:22 +02:00

20 lines
926 B
Diff

diff --git a/Makefile.pre.in b/Makefile.pre.in
index 7f4ec2f..e270bf2 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1038,6 +1038,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
done; \
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+ifeq (@COMPILE_ALL_TESTS@,yes)
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
@@ -1064,6 +1065,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+endif
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):