|
|
@ -4,6 +4,7 @@ |
|
|
|
|
|
|
|
# Copyright 2016-2019 Serban Udrea <s.udrea@gsi.de> |
|
|
|
# Copyright 2022 Isaac Yu <isaacyu@protonmail.com> |
|
|
|
# Copyright 2023 Jeremy Hansen <jebrhansen+SBo@gmail.com> |
|
|
|
# All rights reserved. |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modification, |
|
|
@ -33,7 +34,7 @@ cd $(dirname $0) ; CWD=$(pwd) |
|
|
|
|
|
|
|
PRGNAM="python3-scipy" |
|
|
|
SRCNAM="scipy" |
|
|
|
VERSION=${VERSION:-1.9.1} |
|
|
|
VERSION=${VERSION:-1.11.3} |
|
|
|
BUILD=${BUILD:-1} |
|
|
|
TAG=${TAG:-_SBo} |
|
|
|
PKGTYPE=${PKGTYPE:-tgz} |
|
|
@ -46,9 +47,6 @@ if [ -z "$ARCH" ]; then |
|
|
|
esac |
|
|
|
fi |
|
|
|
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what |
|
|
|
# the name of the created package would be, and then exit. This information |
|
|
|
# could be useful to other scripts. |
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then |
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" |
|
|
|
exit 0 |
|
|
@ -69,29 +67,31 @@ cd "$SRCNAM-$VERSION" |
|
|
|
chown -R root:root . |
|
|
|
|
|
|
|
find -L . \ |
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ |
|
|
|
-exec chmod 755 {} \; -o \ |
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ |
|
|
|
-exec chmod 644 {} \; |
|
|
|
|
|
|
|
DEBUG=${DEBUG:-no} |
|
|
|
DEBUG=$(echo "$DEBUG"|cut -b 1|tr a-z A-Z) |
|
|
|
|
|
|
|
if [ "$DEBUG" = "N" ] |
|
|
|
then |
|
|
|
python3 setup.py install --root $PKG |
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ |
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |
|
|
|
else |
|
|
|
python3 setup.py build --debug |
|
|
|
python3 setup.py install --root $PKG |
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ |
|
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \ |
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ |
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; |
|
|
|
|
|
|
|
# Allow our version of pybind11 and numpy to work |
|
|
|
sed -i 's|<2.11.1|<=2.11.1|' pyproject.toml |
|
|
|
sed -i 's|numpy==1.21.6|numpy>=1.21.6|' pyproject.toml |
|
|
|
|
|
|
|
# needs newer meson |
|
|
|
export PYTHONPATH=/opt/python3.9/site-packages/ |
|
|
|
|
|
|
|
python3 -m build --wheel --no-isolation |
|
|
|
python3 -m installer --destdir "$PKG" dist/*.whl |
|
|
|
|
|
|
|
# Skip stripping symbols if DEBUG is YES |
|
|
|
if [ "${DEBUG:-NO}" == "NO" ]; then |
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ |
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |
|
|
|
fi |
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
cp -a LICENSE.txt HACKING.rst.txt PKG-INFO \ |
|
|
|
cp -a CONTRIBUTING.rst LICENSE.txt LICENSES_bundled.txt README.rst PKG-INFO \ |
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |
|
|
|
find $PKG/usr/doc -type f -exec chmod 0644 {} \; |
|
|
|
|
|
|
|
mkdir -p $PKG/install |
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc |
|
|
|