Skip to content

Commit 9236f35

Browse files
committed
added perseverance in python-config selection during extension module build. Try python-config then python2-config and finally python3-config on the python2 branches.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6172 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 9f6984b commit 9236f35

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mig/src/libnss-mig/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DEBUG_CFLAGS=
3838
CC = gcc
3939
INCLUDES=
4040
# NOTE: try python-config first: if 2 and 3 are installed default is there
41-
PYCONF = $(shell which python-config 2> /dev/null || which python3-config 2> /dev/null)
41+
PYCONF = $(shell which python-config 2> /dev/null || which python2-config 2> /dev/null || which python3-config 2> /dev/null)
4242
DEFINES=$(MIG_DEFAULTS) \
4343
$(DEBUG_DEFINES)
4444
CFLAGS=${DEBUG_CFLAGS} -Wall -Wpedantic $(shell ${PYCONF} --cflags)

mig/src/libpam-mig/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DEBUG_CFLAGS=
4141

4242
CC = gcc
4343
# NOTE: try python-config first: if 2 and 3 are installed default is there
44-
PYCONF = $(shell which python-config 2> /dev/null || which python3-config 2> /dev/null)
44+
PYCONF = $(shell which python-config 2> /dev/null || which python2-config 2> /dev/null || which python3-config 2> /dev/null)
4545
PYLDFLAGS = $(shell ${PYCONF} --ldflags --embed | egrep -v '^Usage: ' || ${PYCONF} --ldflags)
4646
LIBPYTHON = $(shell echo ${PYLDFLAGS} | sed 's/.*-l\(python[^ ]\+\).*/lib\1.so/g')
4747
BUILD_DEFINES = -D'LIBPYTHON="${LIBPYTHON}"'

0 commit comments

Comments
 (0)