diff options
author | Audrius Kažukauskas <audrius@neutrino.lt> | 2014-04-13 22:46:28 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-04-13 22:46:28 +0700 |
commit | 5903ee899fc79696fad4552c51971545e7bc12a6 (patch) | |
tree | bf5b82604054f5f030a891d234e32fdc834fb65b | |
parent | 3b0bddf7a515543abc89ae438199130ee0abd715 (diff) | |
download | slackbuilds-5903ee899fc79696fad4552c51971545e7bc12a6.tar.gz |
python/python3: Install pip and setuptools.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | python/python3/python3.SlackBuild | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/python/python3/python3.SlackBuild b/python/python3/python3.SlackBuild index 09de0ae176..536568c23d 100644 --- a/python/python3/python3.SlackBuild +++ b/python/python3/python3.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=python3 VERSION=${VERSION:-3.4.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -80,6 +80,10 @@ 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 + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -100,31 +104,25 @@ find -L . \ --build=$ARCH-slackware-linux make -make altinstall DESTDIR=$PKG - -# Create a few useful symlinks. -( cd $PKG/usr/bin - ln -sf python${PYVER} python3 - ln -sf python${PYVER}*-config python3-config - ln -sf pydoc${PYVER} pydoc3 - ln -sf pyvenv-${PYVER} pyvenv - ln -sf idle${PYVER} idle3 - cd $PKG/usr/man/man1 - ln -sf python${PYVER}.1 python3.1 -) +make install DESTDIR=$PKG + +# Remove to avoid overwriting a copy from Python2. +rm -f $PKG/usr/bin/2to3 # We'll install the python-tools under site-packages: mkdir -p $SITEPK cp -a Tools/* $SITEPK +rm -f $SITEPK/setuptools/*.exe + # Install docs: -mkdir -p $PKG/usr/doc/python3-$VERSION -cp -a README LICENSE Misc $PKG/usr/doc/python3-$VERSION -mv $SITEPK/README $PKG/usr/doc/python3-$VERSION/README.python-tools -( cd $PKG/usr/doc/python3-$VERSION ; ln -sf $TOOLSDIR Tools ) +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README LICENSE Misc $PKG/usr/doc/$PRGNAM-$VERSION +mv $SITEPK/README $PKG/usr/doc/$PRGNAM-$VERSION/README.python-tools +( cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -sf $TOOLSDIR Tools ) tar xf $CWD/python-$VERSION-docs-html.tar.bz2 -mv python-$VERSION-docs-html $PKG/usr/doc/python3-$VERSION/html -chown -R root:root $PKG/usr/doc/python3-$VERSION +mv python-$VERSION-docs-html $PKG/usr/doc/$PRGNAM-$VERSION/html +chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |