1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
diff -Naur spack-src/configure spack-src.patched/configure
--- spack-src/configure 2020-03-10 13:55:53.000000000 -0400
+++ spack-src.patched/configure 2021-05-06 11:33:59.062284048 -0400
@@ -19263,10 +19263,11 @@
# Check for Python library path
+ PYTHON_MAJOR=`echo $PYTHON_VERSION | sed "s,\..*$,,"`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
$as_echo_n "checking for Python library path... " >&6; }
for i in "$base_python_path/lib/python$PYTHON_VERSION/config/" "$base_python_path/lib/python$PYTHON_VERSION/" "$base_python_path/lib/python/config/" "$base_python_path/lib/python/" "$base_python_path/" "$base_python_path/libs/" ; do
- python_path=`find $i -name libpython$PYTHON_VERSION.* -print 2> /dev/null | sed "1q"`
+ python_path=`find $i -name libpython$PYTHON_MAJOR.* -print 2> /dev/null | sed "1q"`
if test -n "$python_path" ; then
break
fi
@@ -19277,7 +19278,7 @@
if test -z "$python_path" ; then
as_fn_error $? "cannot find Python library path" "$LINENO" 5
fi
- PYTHON_LDFLAGS="-L$python_path -lpython$PYTHON_VERSION"
+ PYTHON_LDFLAGS="-L$python_path -lpython$PYTHON_MAJOR"
#
python_site=`echo $base_python_path | sed "s/config/site-packages/"`
@@ -19290,7 +19291,7 @@
$as_echo_n "checking python extra libraries... " >&6; }
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
- print (conf('LOCALMODLIBS') or '')+' '+(conf('LIBS') or '')"
+ print((conf('LOCALMODLIBS') or '')+' '+(conf('LIBS') or ''))"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
$as_echo "$PYTHON_EXTRA_LIBS" >&6; }`
diff -Naur spack-src/macros/ac_python_devel.m4 spack-src.patched/macros/ac_python_devel.m4
--- spack-src/macros/ac_python_devel.m4 2017-09-06 09:48:30.000000000 -0400
+++ spack-src.patched/macros/ac_python_devel.m4 2021-05-06 11:32:59.545478100 -0400
@@ -43,9 +43,10 @@
AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
# Check for Python library path
+ PYTHON_MAJOR=`echo $PYTHON_VERSION | sed "s,\..*$,,"`
AC_MSG_CHECKING([for Python library path])
for i in "$base_python_path/lib/python$PYTHON_VERSION/config/" "$base_python_path/lib/python$PYTHON_VERSION/" "$base_python_path/lib/python/config/" "$base_python_path/lib/python/" "$base_python_path/" "$base_python_path/libs/" ; do
- python_path=`find $i -name libpython$PYTHON_VERSION.* -print 2> /dev/null | sed "1q"`
+ python_path=`find $i -name libpython$PYTHON_MAJOR.* -print 2> /dev/null | sed "1q"`
if test -n "$python_path" ; then
break
fi
@@ -55,7 +56,7 @@
if test -z "$python_path" ; then
AC_MSG_ERROR([cannot find Python library path])
fi
- AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
+ AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_MAJOR"])
#
python_site=`echo $base_python_path | sed "s/config/site-packages/"`
AC_SUBST([PYTHON_SITE_PKG],[$python_site])
@@ -65,7 +66,7 @@
AC_MSG_CHECKING(python extra libraries)
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
- print (conf('LOCALMODLIBS') or '')+' '+(conf('LIBS') or '')"
+ print((conf('LOCALMODLIBS') or '')+' '+(conf('LIBS') or ''))"
AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
AC_SUBST(PYTHON_EXTRA_LIBS)
])
|