• 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-3.3-002-no-host-headers-libs.patch
Maxime RipardMaxime Ripard committed 03c4d57f1d907 Nov 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Do not look at host headers/libraries in cross-compile mode
2
​
3
When we are cross-compiling, setup.py should never look in /usr or
4
/usr/local to find headers or libraries. A later patch adds a
5
mechanism to tell setup.py to look in a specific directory for headers
6
and libraries.
7
​
8
Patch first written by Thomas Petazzoni
9
<thomas.petazzoni@free-electrons.com> for python2.7, and then ported
10
to python3.3 by Maxime Ripard <maxime.ripard@free-electrons.com>
11
​
12
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
13
---
14
 setup.py |   23 +++++------------------
15
 1 file changed, 5 insertions(+), 18 deletions(-)
16
​
17
Index: Python-3.3.0/setup.py
18
===================================================================
19
--- Python-3.3.0.orig/setup.py
20
+++ Python-3.3.0/setup.py
21
@@ -447,10 +447,8 @@
22
         if not cross_compiling:
23
             add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
24
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
25
-        # only change this for cross builds for 3.3, issues on Mageia
26
-        if cross_compiling:
27
             self.add_gcc_paths()
28
-        self.add_multiarch_paths()
29
+            self.add_multiarch_paths()
30
 
31
         # Add paths specified in the environment variables LDFLAGS and
32
         # CPPFLAGS for header and library files.
33
@@ -458,10 +456,7 @@
34
         # directly since an inconsistently reproducible issue comes up where
35
         # the environment variable is not set even though the value were passed
36
         # into configure and stored in the Makefile (issue found on OS X 10.3).
37
-        for env_var, arg_name, dir_list in (
38
-                ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
39
-                ('LDFLAGS', '-L', self.compiler.library_dirs),
40
-                ('CPPFLAGS', '-I', self.compiler.include_dirs)):
41
+        for env_var, arg_name, dir_list in ():
42
             env_val = sysconfig.get_config_var(env_var)
43
             if env_val:
44
                 # To prevent optparse from raising an exception about any
45
@@ -486,17 +481,6 @@
46
                     for directory in reversed(options.dirs):
47
                         add_dir_to_list(dir_list, directory)
48
 
49
-        if os.path.normpath(sys.base_prefix) != '/usr' \
50
-                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
51
-            # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
52
-            # (PYTHONFRAMEWORK is set) to avoid # linking problems when
53
-            # building a framework with different architectures than
54
-            # the one that is currently installed (issue #7473)
55
-            add_dir_to_list(self.compiler.library_dirs,
56
-                            sysconfig.get_config_var("LIBDIR"))
57
-            add_dir_to_list(self.compiler.include_dirs,
58
-                            sysconfig.get_config_var("INCLUDEDIR"))
59
-
60
         # lib_dirs and inc_dirs are used to search for files;
61
         # if a file is found in one of those directories, it can
62
         # be assumed that no additional -I,-L directives are needed.
63
@@ -506,6 +490,9 @@
64
                 '/lib', '/usr/lib',
65
                 ]
66
             inc_dirs = self.compiler.include_dirs + ['/usr/include']
67
+        else:
68
+            lib_dirs = self.compiler.library_dirs
69
+            inc_dirs = self.compiler.include_dirs
70
         exts = []
71
         missing = []
72
 
  • 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.