|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
# Slackware build script for python3-netcdf4-python |
|
|
|
|
|
|
|
# Copyright 2022 - Gregory J. L. Tourte <artourter@gmail.com> |
|
|
|
# Copyright 2022-2023 - Gregory J. L. Tourte <artourter@gmail.com> |
|
|
|
# All rights reserved. |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modification, is |
|
|
|
@ -25,13 +25,13 @@ |
|
|
|
cd $(dirname $0) ; CWD=$(pwd) |
|
|
|
|
|
|
|
PRGNAM=python3-netcdf4-python |
|
|
|
VERSION=${VERSION:-1.6.2} |
|
|
|
VERSION=${VERSION:-1.6.4} |
|
|
|
BUILD=${BUILD:-1} |
|
|
|
TAG=${TAG:-_SBo} |
|
|
|
PKGTYPE=${PKGTYPE:-tgz} |
|
|
|
|
|
|
|
SRCNAM=netcdf4-python |
|
|
|
SRCVER=${VERSION} |
|
|
|
SRCVER=${VERSION}rel |
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then |
|
|
|
case "$( uname -m )" in |
|
|
|
@ -50,20 +50,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 |
|
|
|
@ -79,7 +65,18 @@ find -L . \ |
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ |
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; |
|
|
|
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
# 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 |
|
|
|
export PYTHONPATH=/opt/python3.9/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 |
|
|
|
|