summaryrefslogtreecommitdiff
path: root/python/threadpoolctl/threadpoolctl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/threadpoolctl/threadpoolctl.SlackBuild')
-rw-r--r--python/threadpoolctl/threadpoolctl.SlackBuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/python/threadpoolctl/threadpoolctl.SlackBuild b/python/threadpoolctl/threadpoolctl.SlackBuild
index 8e31541328..7f33fbae45 100644
--- a/python/threadpoolctl/threadpoolctl.SlackBuild
+++ b/python/threadpoolctl/threadpoolctl.SlackBuild
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=threadpoolctl
-VERSION=${VERSION:-3.0.0}
+VERSION=${VERSION:-3.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -75,13 +75,26 @@ 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
+# Use this setup.py shim:
+cat << EOF > setup.py
+from distutils.core import setup
+setup(name='${PRGNAM}',
+ version='${VERSION}',
+ py_modules=['${PRGNAM}'],
+)
+EOF
+
+# With the shim, it's a good idea to use "unshare -n" to prevent downloading
+# anything extra:
+unshare -n python3 setup.py install --root=$PKG || exit 1
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.md LICENSE PKG-INFO dev-requirements.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CHANGES.md LICENSE multiple_openmp.md PKG-INFO README.md dev-requirements.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install