|
@@ -1,22 +1,24 @@
|
|
-Add an option to disable lib2to3
|
|
|
|
|
|
+From 4d6bc8497ab740ae23a7091ff91dba06a63ba877 Mon Sep 17 00:00:00 2001
|
|
|
|
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
+Date: Wed, 23 Dec 2015 11:48:44 +0100
|
|
|
|
+Subject: [PATCH] Add an option to disable lib2to3
|
|
|
|
|
|
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
|
|
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
|
|
such, it is probably not very useful on embedded system targets.
|
|
such, it is probably not very useful on embedded system targets.
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
|
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
|
-
|
|
|
|
---
|
|
---
|
|
- Makefile.pre.in | 18 ++++++++++++++----
|
|
|
|
- configure.ac | 6 ++++++
|
|
|
|
- setup.py | 5 +++--
|
|
|
|
- 3 files changed, 23 insertions(+), 6 deletions(-)
|
|
|
|
|
|
+ Makefile.pre.in | 16 ++++++++++++----
|
|
|
|
+ configure.ac | 6 ++++++
|
|
|
|
+ setup.py | 5 +++--
|
|
|
|
+ 3 files changed, 21 insertions(+), 6 deletions(-)
|
|
|
|
|
|
-Index: b/Makefile.pre.in
|
|
|
|
-===================================================================
|
|
|
|
|
|
+diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
|
|
+index 5e2333e..6656f48 100644
|
|
--- a/Makefile.pre.in
|
|
--- a/Makefile.pre.in
|
|
+++ b/Makefile.pre.in
|
|
+++ b/Makefile.pre.in
|
|
-@@ -1107,7 +1107,9 @@
|
|
|
|
|
|
+@@ -1104,7 +1104,9 @@ ifeq (@PYDOC@,yes)
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
|
|
endif
|
|
endif
|
|
-rm -f $(DESTDIR)$(BINDIR)/2to3
|
|
-rm -f $(DESTDIR)$(BINDIR)/2to3
|
|
@@ -26,7 +28,7 @@ Index: b/Makefile.pre.in
|
|
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
|
|
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
|
|
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
|
|
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
|
|
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
|
|
-@@ -1147,7 +1149,6 @@
|
|
|
|
|
|
+@@ -1144,7 +1146,6 @@ LIBSUBDIRS= tkinter \
|
|
html json http dbm xmlrpc \
|
|
html json http dbm xmlrpc \
|
|
sqlite3 \
|
|
sqlite3 \
|
|
logging csv wsgiref urllib \
|
|
logging csv wsgiref urllib \
|
|
@@ -34,7 +36,7 @@ Index: b/Makefile.pre.in
|
|
ctypes ctypes/macholib \
|
|
ctypes ctypes/macholib \
|
|
idlelib idlelib/Icons \
|
|
idlelib idlelib/Icons \
|
|
distutils distutils/command $(XMLLIBSUBDIRS) \
|
|
distutils distutils/command $(XMLLIBSUBDIRS) \
|
|
-@@ -1189,9 +1190,6 @@
|
|
|
|
|
|
+@@ -1186,9 +1187,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
|
|
test/test_importlib/namespace_pkgs/module_and_namespace_package \
|
|
test/test_importlib/namespace_pkgs/module_and_namespace_package \
|
|
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
|
|
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
|
|
sqlite3/test \
|
|
sqlite3/test \
|
|
@@ -44,7 +46,7 @@ Index: b/Makefile.pre.in
|
|
ctypes/test \
|
|
ctypes/test \
|
|
idlelib/idle_test \
|
|
idlelib/idle_test \
|
|
distutils/tests \
|
|
distutils/tests \
|
|
-@@ -1204,6 +1202,14 @@
|
|
|
|
|
|
+@@ -1201,6 +1199,14 @@ ifeq (@PYDOC@,yes)
|
|
LIBSUBDIRS += pydoc_data
|
|
LIBSUBDIRS += pydoc_data
|
|
endif
|
|
endif
|
|
|
|
|
|
@@ -59,8 +61,8 @@ Index: b/Makefile.pre.in
|
|
ifeq (@TEST_MODULES@,yes)
|
|
ifeq (@TEST_MODULES@,yes)
|
|
LIBSUBDIRS += $(TESTSUBDIRS)
|
|
LIBSUBDIRS += $(TESTSUBDIRS)
|
|
endif
|
|
endif
|
|
-@@ -1299,10 +1305,12 @@
|
|
|
|
- -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
|
|
|
|
|
|
+@@ -1296,10 +1302,12 @@ ifeq (@PYO_BUILD@,yes)
|
|
|
|
+ -d $(LIBDEST)/site-packages -f \
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
endif
|
|
endif
|
|
+ifeq (@LIB2TO3@,yes)
|
|
+ifeq (@LIB2TO3@,yes)
|
|
@@ -72,11 +74,28 @@ Index: b/Makefile.pre.in
|
|
|
|
|
|
# Create the PLATDIR source directory, if one wasn't distributed..
|
|
# Create the PLATDIR source directory, if one wasn't distributed..
|
|
$(srcdir)/Lib/$(PLATDIR):
|
|
$(srcdir)/Lib/$(PLATDIR):
|
|
-Index: b/setup.py
|
|
|
|
-===================================================================
|
|
|
|
|
|
+diff --git a/configure.ac b/configure.ac
|
|
|
|
+index 2e75345..0ed6b17 100644
|
|
|
|
+--- a/configure.ac
|
|
|
|
++++ b/configure.ac
|
|
|
|
+@@ -2670,6 +2670,12 @@ AC_ARG_ENABLE(test-modules,
|
|
|
|
+ AS_HELP_STRING([--disable-test-modules], [disable test modules]),
|
|
|
|
+ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
|
|
|
|
+
|
|
|
|
++AC_SUBST(LIB2TO3)
|
|
|
|
++
|
|
|
|
++AC_ARG_ENABLE(lib2to3,
|
|
|
|
++ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
|
|
|
|
++ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
|
|
|
|
++
|
|
|
|
+ # Check for enable-ipv6
|
|
|
|
+ AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
|
|
|
|
+ AC_MSG_CHECKING([if --enable-ipv6 is specified])
|
|
|
|
+diff --git a/setup.py b/setup.py
|
|
|
|
+index 69198db..a2bf05a 100644
|
|
--- a/setup.py
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
+++ b/setup.py
|
|
-@@ -2201,10 +2201,11 @@
|
|
|
|
|
|
+@@ -2201,10 +2201,11 @@ def main():
|
|
import warnings
|
|
import warnings
|
|
warnings.filterwarnings("ignore",category=DeprecationWarning)
|
|
warnings.filterwarnings("ignore",category=DeprecationWarning)
|
|
|
|
|
|
@@ -90,20 +109,6 @@ Index: b/setup.py
|
|
|
|
|
|
setup(# PyPI Metadata (PEP 301)
|
|
setup(# PyPI Metadata (PEP 301)
|
|
name = "Python",
|
|
name = "Python",
|
|
-Index: b/configure.ac
|
|
|
|
-===================================================================
|
|
|
|
---- a/configure.ac
|
|
|
|
-+++ b/configure.ac
|
|
|
|
-@@ -2687,6 +2687,12 @@
|
|
|
|
- AS_HELP_STRING([--disable-test-modules], [disable test modules]),
|
|
|
|
- [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
|
|
|
|
-
|
|
|
|
-+AC_SUBST(LIB2TO3)
|
|
|
|
-+
|
|
|
|
-+AC_ARG_ENABLE(lib2to3,
|
|
|
|
-+ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
|
|
|
|
-+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
|
|
|
|
-+
|
|
|
|
- # Check for enable-ipv6
|
|
|
|
- AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
|
|
|
|
- AC_MSG_CHECKING([if --enable-ipv6 is specified])
|
|
|
|
|
|
+--
|
|
|
|
+2.6.4
|
|
|
|
+
|