|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
# Build script for Slackware
|
|
|
|
|
# Copyright (C) 2018 Damien Goutte-Gattat
|
|
|
|
|
# Copyright (C) 2018,2019 Damien Goutte-Gattat
|
|
|
|
|
#
|
|
|
|
|
# Redistribution and use of this script, with or without modifications,
|
|
|
|
|
# is permitted provided that the following conditions are met:
|
|
|
|
@ -25,13 +25,12 @@
|
|
|
|
|
# Latest prompt_toolkit sourcecode is available at:
|
|
|
|
|
# <https://github.com/jonathanslenders/python-prompt-toolkit>.
|
|
|
|
|
#
|
|
|
|
|
# Depends: l/python-six, l/python-wcwidth
|
|
|
|
|
# Depends: l/python-wcwidth
|
|
|
|
|
|
|
|
|
|
# Source package infos
|
|
|
|
|
NAMESRC=${NAMESRC:-prompt_toolkit}
|
|
|
|
|
VERSION=${VERSION:-1.0.15}
|
|
|
|
|
VERSION=${VERSION:-2.0.10}
|
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
|
|
|
|
|
WGET=${WGET:-https://pypi.python.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/$ARCHIVE}
|
|
|
|
|
|
|
|
|
|
# Build infos
|
|
|
|
|
NAMEPKG=${NAMEPKG:-python-prompt-toolkit}
|
|
|
|
@ -60,8 +59,7 @@ fi
|
|
|
|
|
|
|
|
|
|
# Get and verify the source archive
|
|
|
|
|
if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET"
|
|
|
|
|
mv $ARCHIVE.part $ARCHIVE
|
|
|
|
|
pip3 download --no-binary :all: --no-deps $NAMESRC==$VERSION
|
|
|
|
|
fi
|
|
|
|
|
sha256sum -c $ARCHIVE.sha256
|
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
|
|
|
|
@ -71,8 +69,10 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..."
|
|
|
|
|
tar xf $CWD/$ARCHIVE
|
|
|
|
|
cd $NAME
|
|
|
|
|
python setup.py build
|
|
|
|
|
python setup.py install --root=$PKG
|
|
|
|
|
python2 setup.py build
|
|
|
|
|
python2 setup.py install --root=$PKG
|
|
|
|
|
python3 setup.py build
|
|
|
|
|
python3 setup.py install --root=$PKG
|
|
|
|
|
|
|
|
|
|
# Install the documentation
|
|
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
|
|
|
|
@ -84,7 +84,6 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
|
|
|
|
|
|
|
|
|
|
# Add dependency infos
|
|
|
|
|
cat <<EOF > $PKG/install/slack-required
|
|
|
|
|
python-six
|
|
|
|
|
python-wcwidth
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|