|
|
|
@ -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,14 @@ |
|
|
|
|
# Latest testpath sourcecode is available at: |
|
|
|
|
# <https://github.com/jupyter/testpath>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/python-pathlib2 |
|
|
|
|
# Note: l/python-pathlib2 is only required under Python 2. |
|
|
|
|
# |
|
|
|
|
# Optional: l/python-pathlib2 |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-testpath} |
|
|
|
|
VERSION=${VERSION:-0.3.1} |
|
|
|
|
VERSION=${VERSION:-0.4.4} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://pypi.python.org/packages/f4/8b/b71e9ee10e5f751e9d959bc750ab122ba04187f5aa52aabdc4e63b0e31a7/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-python-testpath} |
|
|
|
@ -60,8 +61,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,21 +71,23 @@ 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 |
|
|
|
|
install -m 644 LICENSE README.rst $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
|
|
# Build HTML docs if Sphinx is available |
|
|
|
|
if sphinx-build -b html doc $PKG/usr/doc/$NAMEPKG-$VERSION/html ; then |
|
|
|
|
rm -rf $PKG/usr/doc/$NAMEPKG-$VERSION/html/.{buildinfo,doctrees} |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
|
python-pathlib2 |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|
cd $PKG |
|
|
|
|
mkdir -p $OUT |
|
|
|
|