|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
# SlackBuild script for "python-parse". |
|
|
|
|
|
|
|
# Copyright 2024 Sean Hinchee |
|
|
|
# Copyright 2014-2015 Marcel Saegebarth <marc@mos6581.de> |
|
|
|
# All rights reserved. |
|
|
|
# |
|
|
@ -28,8 +29,8 @@ cd $(dirname $0) ; CWD=$(pwd) |
|
|
|
|
|
|
|
PRGNAM=python-parse |
|
|
|
SRCNAM=parse |
|
|
|
VERSION=${VERSION:-1.6.6} |
|
|
|
BUILD=${BUILD:-4} |
|
|
|
VERSION=${VERSION:-1.20.2} |
|
|
|
BUILD=${BUILD:-1} |
|
|
|
TAG=${TAG:-_SBo} |
|
|
|
PKGTYPE=${PKGTYPE:-tgz} |
|
|
|
|
|
|
@ -41,9 +42,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 |
|
|
@ -82,11 +80,12 @@ 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 {} \; |
|
|
|
|
|
|
|
python setup.py install --root=$PKG |
|
|
|
# newer releases use setuptools |
|
|
|
PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') |
|
|
|
export PYTHONPATH=/opt/python$PYVER/site-packages |
|
|
|
|
|
|
|
if $(python3 -c 'import sys' 2>/dev/null); then |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
fi |
|
|
|
python3 -m build . --wheel --no-isolation # --root=$PKG |
|
|
|
python3 -m installer --destdir "$PKG" dist/*.whl |
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
cp -a README.rst $PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|