1 Add an option to disable lib2to3
3 lib2to3 is a library to convert Python 2.x code to Python 3.x. As
4 such, it is probably not very useful on embedded system targets.
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
10 Makefile.pre.in | 24 +++++++++++++++++-------
11 configure.in | 6 ++++++
13 3 files changed, 26 insertions(+), 9 deletions(-)
15 Index: b/Makefile.pre.in
16 ===================================================================
22 logging bsddb csv importlib wsgiref \
23 - lib2to3 lib2to3/fixes lib2to3/pgen2 \
24 ctypes ctypes/macholib \
25 idlelib idlelib/Icons \
26 distutils distutils/command $(XMLLIBSUBDIRS) \
32 - lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
37 LIBSUBDIRS += pydoc_data
41 +LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
42 +TESTSUBDIRS += lib2to3/tests \
43 + lib2to3/tests/data \
44 + lib2to3/tests/data/fixers \
45 + lib2to3/tests/data/fixers/myfixes
48 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
49 @for i in $(SCRIPTDIR) $(LIBDEST); \
52 ===================================================================
55 @@ -2645,6 +2645,12 @@
56 AS_HELP_STRING([--disable-test-modules], [disable test modules]),
57 [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
61 +AC_ARG_ENABLE(lib2to3,
62 + AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
63 + [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
65 # Check for enable-ipv6
66 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
67 AC_MSG_CHECKING([if --enable-ipv6 is specified])
69 ===================================================================
72 @@ -2212,10 +2212,11 @@
74 warnings.filterwarnings("ignore",category=DeprecationWarning)
76 - scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3',
78 + scripts = ['Tools/scripts/idle', 'Lib/smtpd.py']
79 if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
80 scripts += [ 'Tools/scripts/pydoc' ]
81 + if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
82 + scripts += [ 'Tools/scripts/2to3' ]
84 setup(# PyPI Metadata (PEP 301)