|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2010,2012,2014,2015,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2010,2012,2014,2015,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,13 +24,12 @@ |
|
|
|
# |
|
|
|
# Latest pytables sourcecode is available at: <http://www.pytables.org/>. |
|
|
|
# |
|
|
|
# Depends: l/hdf5, l/numexpr, l/python-mock |
|
|
|
# Depends: l/hdf5, l/numexpr |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-tables} |
|
|
|
VERSION=${VERSION:-3.5.2} |
|
|
|
VERSION=${VERSION:-3.6.1} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/73/51/6dabb2b94826e5db3aa2542b80f1382780b96a0cd13e0cfb637b36ede5c5/$ARCHIVE} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-pytables} |
|
|
@ -72,8 +71,7 @@ esac |
|
|
|
|
|
|
|
# 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) |
|
|
@ -86,30 +84,9 @@ cd $NAME |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
CPPFLAGS=-I/usr/include/hdf5 \ |
|
|
|
python2 setup.py build |
|
|
|
CPPFLAGS=-I/usr/include/hdf5 \ |
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
# Add a suffix to installed executable files |
|
|
|
for f in pttree pt2to3 ptdump ; do |
|
|
|
mv $PKG/usr/bin/$f $PKG/usr/bin/$f-2.7 |
|
|
|
done |
|
|
|
|
|
|
|
# And now for Python3 |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
CPPFLAGS=-I/usr/include/hdf5 \ |
|
|
|
python3 setup.py build |
|
|
|
CPPFLAGS=-I/usr/include/hdf5 \ |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
# Add a suffix to installed executable files |
|
|
|
for f in pttree pt2to3 ptdump ; do |
|
|
|
mv $PKG/usr/bin/$f $PKG/usr/bin/$f-3.7 |
|
|
|
done |
|
|
|
|
|
|
|
# Add default symlinks to the 2.7 executables |
|
|
|
for f in pttree pt2to3 ptdump ; do |
|
|
|
ln -s $f-2.7 $PKG/usr/bin/$f |
|
|
|
done |
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
@ -117,9 +94,13 @@ find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 ANNOUNCE.txt LICENSE.txt LICENSES/* README.rst \ |
|
|
|
RELEASE_NOTES.txt THANKS $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
cp -r examples doc/html doc/scripts $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 LICENSE.txt LICENSES/* README.rst RELEASE_NOTES.txt THANKS \ |
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Build HTML docs if Sphinx is available |
|
|
|
if PYTHONPATH=lib/build.linux-$ARCH-3.8 sphinx-build -b html doc/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 |
|
|
@ -128,7 +109,6 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
cat <<EOF > $PKG/install/slack-required |
|
|
|
hdf5 |
|
|
|
numexpr |
|
|
|
python-mock |
|
|
|
EOF |
|
|
|
|
|
|
|
# Package the tree |
|
|
|