|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2018,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2018,2019,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -24,9 +24,7 @@ |
|
|
|
# |
|
|
|
# Latest traitlets sourcecode is available at: <http://ipython.org/>. |
|
|
|
# |
|
|
|
# NOTE: l/python-enum34 is only needed for Python 2. |
|
|
|
# |
|
|
|
# Recommends: l/python-enum34 |
|
|
|
# Depends: l/ipython-genutils |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-traitlets} |
|
|
@ -45,6 +43,7 @@ TMP=${TMP:-/tmp} |
|
|
|
OUT=${OUT:-$TMP/build} |
|
|
|
PKG=${PKG:-$OUT/$NAMEPKG} |
|
|
|
CWD=$(pwd) |
|
|
|
PYTHONDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') |
|
|
|
|
|
|
|
set -e # Quit if a command returns non-zero |
|
|
|
|
|
|
@ -70,8 +69,6 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
python2 setup.py build |
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
python3 setup.py build |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
@ -79,13 +76,18 @@ python3 setup.py install --root=$PKG |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 CONTRIBUTING.md COPYING.md README.md $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Build HTML docs if possible |
|
|
|
export PYTHONPATH=$PKG$PYTHONDIR |
|
|
|
if sphinx-build -b html docs/source $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-decorator |
|
|
|
python-enum34 |
|
|
|
ipython-genutils |
|
|
|
EOF |
|
|
|
|
|
|
|
# Package the tree |
|
|
|