|
|
|
@ -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: |
|
|
|
@ -24,14 +24,12 @@ |
|
|
|
|
# |
|
|
|
|
# Latest nbformat sourcecode is available at: <http://jupyter.org/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/ipython-genutils, l/python-traitlets, l/python-jsonschema |
|
|
|
|
# Depends: l/jupyter-core |
|
|
|
|
# Depends: l/ipython-genutils, l/jupyter-core, l/python-jsonschema |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-nbformat} |
|
|
|
|
VERSION=${VERSION:-4.4.0} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://pypi.python.org/packages/6e/0e/160754f7ae3e984863f585a3743b0ed1702043a81245907c8fae2d537155/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-jupyter-nbformat} |
|
|
|
@ -60,8 +58,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,22 +68,28 @@ 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 COPYING.md README.md $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
|
|
# Build HTML docs if Sphinx is available |
|
|
|
|
if sphinx-build -b html docs $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 |
|
|
|
|
ipython-genutils |
|
|
|
|
python-traitlets |
|
|
|
|
python-jsonschema |
|
|
|
|
jupyter-core |
|
|
|
|
python-jsonschema |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|