summaryrefslogtreecommitdiff
path: root/python/python3/python3.SlackBuild
diff options
context:
space:
mode:
authorAudrius Kažukauskas <audrius@neutrino.lt>2015-03-01 22:20:28 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-03-08 06:35:07 +0700
commit488a866d870abcaa6cf1aa1b165136a20361fabc (patch)
tree5a2c423bde2329e93b138d25ee5211c6a2bde274 /python/python3/python3.SlackBuild
parente7f9c311f6a69fd909fab4c2c641fd3b3e8f05e7 (diff)
downloadslackbuilds-488a866d870abcaa6cf1aa1b165136a20361fabc.tar.gz
python/python3: Updated for version 3.4.3.
Signed-off-by: Audrius Kažukauskas <audrius@neutrino.lt>
Diffstat (limited to 'python/python3/python3.SlackBuild')
-rw-r--r--python/python3/python3.SlackBuild22
1 files changed, 13 insertions, 9 deletions
diff --git a/python/python3/python3.SlackBuild b/python/python3/python3.SlackBuild
index b2b689ac7b..6b67d7609b 100644
--- a/python/python3/python3.SlackBuild
+++ b/python/python3/python3.SlackBuild
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=python3
-VERSION=${VERSION:-3.4.2}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.4.3}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -80,9 +80,12 @@ fi
# Fix python3 path in cgi.py.
sed -i '1s|^#.*/usr/local/bin/python|#!/usr/bin/python3|' Lib/cgi.py
-# Isolate ensurepip from site-packages, otherwise pip won't be installed if
-# there's Python3 on this system with pip already in site-packages.
-sed -i 's/-m ensurepip/-Sm ensurepip/' Makefile.pre.in
+# If this system already has Python3 with pip in site-packages, ignore it and
+# install pip anyway.
+sed -i 's|\("install",\)|\1 "--ignore-installed",|' Lib/ensurepip/__init__.py
+
+# Fix the SO for --extension-suffix in python3-config.
+sed -i 's|@SO@|@EXT_SUFFIX@|' Misc/python-config.sh.in
chown -R root:root .
find -L . \
@@ -91,9 +94,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fix the SO for --extension-suffix in python3-config.
-sed -i 's|@SO@|@EXT_SUFFIX@|' Misc/python-config.sh.in
-
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -109,6 +109,10 @@ sed -i 's|@SO@|@EXT_SUFFIX@|' Misc/python-config.sh.in
make
make install DESTDIR=$PKG
+# Restore original ensurepip behaviour.
+sed -i 's|\("install",\) "--ignore-installed",|\1|' \
+ $PKG/usr/lib${LIBDIRSUFFIX}/python${PYVER}/ensurepip/__init__.py
+
# Remove to avoid overwriting a copy from Python2.
rm -f $PKG/usr/bin/2to3
@@ -133,7 +137,7 @@ if [ -e "$CWD/python-$VERSION-docs-html.tar.bz2" ]; then
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION/html
fi
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;