diff options
Diffstat (limited to 'python/testpath/testpath.SlackBuild')
-rw-r--r-- | python/testpath/testpath.SlackBuild | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/python/testpath/testpath.SlackBuild b/python/testpath/testpath.SlackBuild index abb2a10f6c..ac91554187 100644 --- a/python/testpath/testpath.SlackBuild +++ b/python/testpath/testpath.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=testpath -VERSION=${VERSION:-0.5.0} +VERSION=${VERSION:-0.6.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -80,14 +80,25 @@ 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}', + packages=['${PRGNAM}'], + package_data={'': ['*']}) +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 \ - LICENSE PKG-INFO README.rst doc/ \ + LICENSE PKG-INFO README.rst \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |