• 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/010-fix-python-config.patch
Thomas PetazzoniThomas Petazzoni committed 897d07c313128 Dec 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
+   echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir"
 
1
Add a backport of http://bugs.python.org/issue16235 so we can use
2
python-config for cross builds.
3
This basically replaces the python version of python-config with a pure-shell
4
version that's already preprocessed when installed and doesn't depend
5
on the sysconfig import that usually leads to bad data/results.
6
​
7
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
8
​
9
Index: b/configure.ac
10
===================================================================
11
--- a/configure.ac
12
+++ b/configure.ac
13
@@ -882,6 +882,7 @@
14
 
15
 # Other platforms follow
16
 if test $enable_shared = "yes"; then
17
+  PY_ENABLE_SHARED=1
18
   AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
19
   case $ac_sys_system in
20
     BeOS*)
21
@@ -942,6 +943,7 @@
22
 
23
   esac
24
 else # shared is disabled
25
+  PY_ENABLE_SHARED=0
26
   case $ac_sys_system in
27
     CYGWIN*)
28
           BLDLIBRARY='$(LIBRARY)'
29
@@ -1918,6 +1920,9 @@
30
 AC_SUBST(BLDSHARED)
31
 AC_SUBST(CCSHARED)
32
 AC_SUBST(LINKFORSHARED)
33
+AC_SUBST(PY_ENABLE_SHARED)
34
+LIBPL="${prefix}/lib/python${VERSION}/config"
35
+AC_SUBST(LIBPL)
36
 # SO is the extension of shared libraries `(including the dot!)
37
 # -- usually .so, .sl on HP-UX, .dll on Cygwin
38
 AC_MSG_CHECKING(SO)
39
@@ -4581,7 +4586,7 @@
40
 AC_SUBST(ENSUREPIP)
41
 
42
 # generate output files
43
-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
44
+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
45
 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
46
 AC_OUTPUT
47
 
48
Index: b/Makefile.pre.in
49
===================================================================
50
--- a/Makefile.pre.in
51
+++ b/Makefile.pre.in
52
@@ -166,7 +166,7 @@
53
 SUBDIRSTOO=    Include Lib Misc Demo
54
 
55
 # Files and directories to be distributed
56
-CONFIGFILES=   configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
57
+CONFIGFILES=   configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Misc/python-config.sh
58
 DISTFILES= README ChangeLog $(CONFIGFILES)
59
 DISTDIRS=  $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
60
 DIST=      $(DISTFILES) $(DISTDIRS)
61
@@ -410,7 +410,7 @@
62
 
63
 # Default target
  • 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.