diff options
Diffstat (limited to 'gis/python3-shapely/python3-shapely.SlackBuild')
-rw-r--r-- | gis/python3-shapely/python3-shapely.SlackBuild | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/gis/python3-shapely/python3-shapely.SlackBuild b/gis/python3-shapely/python3-shapely.SlackBuild index 5b3e54a387..12a2c42b8b 100644 --- a/gis/python3-shapely/python3-shapely.SlackBuild +++ b/gis/python3-shapely/python3-shapely.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for Shapely # Copyright 2013-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> -# Copyright 2021-2022 Gregory J. L. Tourte <artourter@gmail.com> +# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-shapely -VERSION=${VERSION:-1.8.4} +VERSION=${VERSION:-2.0.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,20 +53,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -77,15 +63,22 @@ tar xvf $CWD/$SRCNAM-$VERSION.tar.gz 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 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# remove unnecessary .pxi file -sed -i '/include_package_data=/s/True/False/' setup.py - -python3 setup.py install --root=$PKG + -perm /111 -o \! -perm 755 -o -exec chmod 755 {} + -a \ + \! -perm /111 -o \! -perm 644 -o -exec chmod 644 {} + + +# Fixing numpy dependency check in pyproject.toml: +# oldest-supported-numpy has a strict check and doesn't support newer version +# so we replace it. The alternative is to add --skip-dependency-check to tbe +# build line but this is not deemed optimal. +sed -i 's/oldest-supported-numpy/numpy>=1.19.3/' pyproject.toml + +# Requires newer version of setuptools than available in -stable. Has not +# effect on -current +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages + +python3 -m build --no-isolation +python3 -m installer -d "$PKG" dist/*.whl 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 |