1 |
pacho 11/11/30 15:13:19 |
2 |
|
3 |
Added: gnucash-2.4.8-python-detection.patch |
4 |
Log: |
5 |
Version bump, bug #392317 by José Romildo Malaquias. |
6 |
|
7 |
(Portage version: 2.1.10.38/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-office/gnucash/files/gnucash-2.4.8-python-detection.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/gnucash/files/gnucash-2.4.8-python-detection.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/gnucash/files/gnucash-2.4.8-python-detection.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gnucash-2.4.8-python-detection.patch |
16 |
=================================================================== |
17 |
--- macros/ac_python_devel.m4~ 2011-10-17 18:53:34.000000000 +0200 |
18 |
+++ macros/ac_python_devel.m4 2011-11-30 15:17:45.978799588 +0100 |
19 |
@@ -20,14 +20,8 @@ |
20 |
|
21 |
# Check for Python include path |
22 |
AC_MSG_CHECKING([for Python include path]) |
23 |
- python_path=`echo $PYTHON | sed "s,/bin.*$,,"` |
24 |
- for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do |
25 |
- python_path=`find -L $i -type f -name Python.h -print | sed "1q"` |
26 |
- if test -n "$python_path" ; then |
27 |
- break |
28 |
- fi |
29 |
- done |
30 |
- python_path=`echo $python_path | sed "s,/Python.h$,,"` |
31 |
+ python_path=`$PYTHON -c 'import distutils.sysconfig; \ |
32 |
+ print(distutils.sysconfig.get_python_inc())'` |
33 |
AC_MSG_RESULT([$python_path]) |
34 |
if test -z "$python_path" ; then |
35 |
AC_MSG_ERROR([cannot find Python include path]) |
36 |
@@ -36,21 +30,16 @@ |
37 |
|
38 |
# Check for Python library path |
39 |
AC_MSG_CHECKING([for Python library path]) |
40 |
- python_path=`echo $PYTHON | sed "s,/bin.*$,,"` |
41 |
- for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do |
42 |
- python_path=`find -L $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"` |
43 |
- if test -n "$python_path" ; then |
44 |
- break |
45 |
- fi |
46 |
- done |
47 |
- python_path=`echo $python_path | sed "s,/libpython.*$,,"` |
48 |
+ python_path=`$PYTHON -c 'import distutils.sysconfig; \ |
49 |
+ print(distutils.sysconfig.get_config_var("LIBDIR"))'` |
50 |
AC_MSG_RESULT([$python_path]) |
51 |
if test -z "$python_path" ; then |
52 |
AC_MSG_ERROR([cannot find Python library path]) |
53 |
fi |
54 |
AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"]) |
55 |
# |
56 |
- python_site=`echo $python_path | sed "s/config/site-packages/"` |
57 |
+ python_site=`$PYTHON -c 'import distutils.sysconfig; \ |
58 |
+ print(distutils.sysconfig.get_python_lib(standard_lib=False))'` |
59 |
AC_SUBST([PYTHON_SITE_PKG],[$python_site]) |
60 |
# |
61 |
# libraries which must be linked in when embedding |