summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-01-26 13:49:53 (GMT)
committerBrett Cannon <brett@python.org>2013-01-26 13:49:53 (GMT)
commite103d689acf796a132eea9358981614171836fad (patch)
tree5b6033d27fccdfe929add2474941ae79983917dd /Misc
parent14581d5dc4e4f9117e62b3a1bc62c4ba935be048 (diff)
parent2d7ee47e423cb9ed44b49e16fcaf3a10adfd62ef (diff)
downloadcpython-e103d689acf796a132eea9358981614171836fad.zip
cpython-e103d689acf796a132eea9358981614171836fad.tar.gz
cpython-e103d689acf796a132eea9358981614171836fad.tar.bz2
merge
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS7
-rw-r--r--Misc/python-config.sh.in106
2 files changed, 113 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 7084d19..80c6912 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
-----------------
+- Issue #10156: In the interpreter's initialization phase, unicode globals
+ are now initialized dynamically as needed.
+
- Issue #16980: Fix processing of escaped non-ascii bytes in the
unicode-escape-decode decoder.
@@ -762,6 +765,10 @@ Tests
Build
-----
+- Issue #16235: Implement python-config as a shell script.
+
+- Issue #16769: Remove outdated Visual Studio projects.
+
- Issue #17031: Fix running regen in cross builds.
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
new file mode 100644
index 0000000..6790bf6
--- /dev/null
+++ b/Misc/python-config.sh.in
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+exit_with_usage ()
+{
+ echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir"
+ exit $1
+}
+
+if [ "$1" = "" ] ; then
+ exit_with_usage 1
+fi
+
+# Returns the actual prefix where this script was installed to.
+installed_prefix ()
+{
+ RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
+ if which readlink >/dev/null 2>&1 ; then
+ RESULT=$(readlink -f "$RESULT")
+ fi
+ echo $RESULT
+}
+
+prefix_build="@prefix@"
+prefix_real=$(installed_prefix "$0")
+
+# 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#")
+includedir=$(echo "@includedir@" | sed "s#$prefix_build#$prefix_real#")
+libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#")
+CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#")
+VERSION="@VERSION@"
+LIBM="@LIBM@"
+LIBC="@LIBC@"
+SYSLIBS="$LIBM $LIBC"
+ABIFLAGS="@ABIFLAGS@"
+LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}${ABIFLAGS}"
+BASECFLAGS="@BASECFLAGS@"
+LDLIBRARY="@LDLIBRARY@"
+LINKFORSHARED="@LINKFORSHARED@"
+OPT="@OPT@"
+PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
+LDVERSION="@LDVERSION@"
+LIBDEST=${prefix}/lib/python${VERSION}
+LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#")
+SO="@SO@"
+PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
+INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
+PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
+
+# Scan for --help or unknown argument.
+for ARG in $*
+do
+ case $ARG in
+ --help)
+ exit_with_usage 0
+ ;;
+ --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir)
+ ;;
+ *)
+ exit_with_usage 1
+ ;;
+ esac
+done
+
+for ARG in "$@"
+do
+ case "$ARG" in
+ --prefix)
+ echo "$prefix"
+ ;;
+ --exec-prefix)
+ echo "$exec_prefix"
+ ;;
+ --includes)
+ echo "$INCDIR $PLATINCDIR"
+ ;;
+ --cflags)
+ echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT"
+ ;;
+ --libs)
+ echo "$LIBS"
+ ;;
+ --ldflags)
+ LINKFORSHAREDUSED=
+ if [ -z "$PYTHONFRAMEWORK" ] ; then
+ LINKFORSHAREDUSED=$LINKFORSHARED
+ fi
+ LIBPLUSED=
+ if [ "$PY_ENABLE_SHARED" = "0" ] ; then
+ LIBPLUSED="-L$LIBPL"
+ fi
+ echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED"
+ ;;
+ --extension-suffix)
+ echo "$SO"
+ ;;
+ --abiflags)
+ echo "$ABIFLAGS"
+ ;;
+ --configdir)
+ echo "$LIBPL"
+ ;;
+esac
+done