• 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/python3/python3-007-disable-extensions.patch
Thomas PetazzoniThomas Petazzoni committed a5dcdf3706308 Jul 2014
Raw file
Source viewDiff to previous
 
1
Add infrastructure to disable the build of certain extensions
2
​
3
Some of the extensions part of the Python core have dependencies on
4
external libraries (sqlite, tk, etc.) or are relatively big and not
5
necessarly always useful (CJK codecs for example). By extensions, we
6
mean part of Python modules that are written in C and therefore
7
compiled to binary code.
8
​
9
Therefore, we introduce a small infrastructure that allows to disable
10
some of those extensions. This can be done inside the configure.ac by
11
adding values to the DISABLED_EXTENSIONS variable (which is a
12
word-separated list of extensions).
13
​
14
The implementation works as follow :
15
​
16
 * configure.ac defines a DISABLED_EXTENSIONS variable, which is
17
   substituted (so that when Makefile.pre is generated from
18
   Makefile.pre.in, the value of the variable is substituted). For
19
   now, this DISABLED_EXTENSIONS variable is empty, later patches will
20
   use it.
21
​
22
 * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the
23
   variables passed in the environment when calling the setup.py
24
   script that actually builds and installs those extensions.
25
​
26
 * setup.py is modified so that the existing "disabled_module_list" is
27
   filled with those pre-disabled extensions listed in
28
   DISABLED_EXTENSIONS.
29
​
30
Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
31
then extended by Thomas Petazzoni
32
<thomas.petazzoni@free-electrons.com>.
33
​
34
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
35
---
36
 Makefile.pre.in |    4 ++++
37
 configure.ac    |    2 ++
38
 setup.py        |    5 ++++-
39
 3 files changed, 10 insertions(+), 1 deletion(-)
40
​
41
Index: b/Makefile.pre.in
42
===================================================================
43
--- a/Makefile.pre.in
44
+++ b/Makefile.pre.in
45
@@ -175,6 +175,8 @@
46
 # configure script arguments
47
 CONFIG_ARGS=   @CONFIG_ARGS@
48
 
49
+# disabled extensions
50
+DISABLED_EXTENSIONS=   @DISABLED_EXTENSIONS@
51
 
52
 # Subdirectories with code
53
 SRCDIRS=   @SRCDIRS@
54
@@ -561,6 +563,7 @@
55
    esac; \
56
    $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
57
        _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
58
+       DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
59
        $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
60
 
61
 # Build static library
62
@@ -1371,7 +1374,8 @@
63
 # Install the dynamically loadable modules
  • 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.