diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2013-08-01 15:32:49 +0200 |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2013-08-01 15:32:49 +0200 |
commit | 0df35b0a57fef5276c09e92da9ea7aaf77476f61 (patch) | |
tree | 6762b20731fdcd090f077eb1a48b04d12cef9ce5 /Misc/python-config.sh.in | |
parent | b2fcebb018740eb69f083e0d98abe0c23dc0e026 (diff) | |
download | cpython-git-0df35b0a57fef5276c09e92da9ea7aaf77476f61.tar.gz |
- Issue #18257: Fix readlink usage in python-config. Install the python
version again on Darwin.
Diffstat (limited to 'Misc/python-config.sh.in')
-rw-r--r-- | Misc/python-config.sh.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in index 6790bf62ff..f5a3dbebea 100644 --- a/Misc/python-config.sh.in +++ b/Misc/python-config.sh.in @@ -1,5 +1,7 @@ #!/bin/sh +# Keep this script in sync with python-config.in + exit_with_usage () { echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir" @@ -15,7 +17,9 @@ installed_prefix () { RESULT=$(dirname $(cd $(dirname "$1") && pwd -P)) if which readlink >/dev/null 2>&1 ; then - RESULT=$(readlink -f "$RESULT") + if readlink -f "$RESULT" >/dev/null 2>&1; then + RESULT=$(readlink -f "$RESULT") + fi fi echo $RESULT } @@ -23,7 +27,8 @@ installed_prefix () prefix_build="@prefix@" prefix_real=$(installed_prefix "$0") -# Use sed to fix paths from their built to locations to their installed to locations. +# Use sed to fix paths from their built-to locations to their installed-to +# locations. prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#") exec_prefix_build="@exec_prefix@" exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#") |