• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/python/python-102-optional-2to3.patch
Thomas PetazzoniThomas Petazzoni committed 63c735b60a908 Jul 2014
Raw file
Source viewDiff to previous
 
1
Add an option to disable lib2to3
2
​
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.
5
​
6
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
8
​
9
---
10
 Makefile.pre.in |   24 +++++++++++++++++-------
11
 configure.in    |    6 ++++++
12
 setup.py        |    5 +++--
13
 3 files changed, 26 insertions(+), 9 deletions(-)
14
​
15
Index: b/Makefile.pre.in
16
===================================================================
17
--- a/Makefile.pre.in
18
+++ b/Makefile.pre.in
19
@@ -934,7 +934,6 @@
20
        json \
21
        sqlite3 \
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) \
27
@@ -953,8 +952,6 @@
28
    json/tests \
29
    sqlite3/test \
30
    bsddb/test \
31
-   lib2to3/tests \
32
-   lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
33
    ctypes/test \
34
    idlelib/idle_test \
35
    distutils/tests \
36
@@ -968,6 +965,14 @@
37
 LIBSUBDIRS += pydoc_data
38
 endif
39
 
40
+ifeq (@LIB2TO3@,yes)
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
46
+endif
47
+
48
 libinstall:    build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
49
    @for i in $(SCRIPTDIR) $(LIBDEST); \
50
    do \
51
Index: b/configure.ac
52
===================================================================
53
--- a/configure.ac
54
+++ b/configure.ac
55
@@ -2636,6 +2636,12 @@
56
    AS_HELP_STRING([--disable-test-modules], [disable test modules]),
57
    [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
58
 
59
+AC_SUBST(LIB2TO3)
60
+
61
+AC_ARG_ENABLE(lib2to3,
62
+   AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
63
+   [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.