aboutsummaryrefslogtreecommitdiff
path: root/python/python3-setuptools-git-versioning
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-setuptools-git-versioning')
-rw-r--r--python/python3-setuptools-git-versioning/README8
-rw-r--r--python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.SlackBuild46
-rw-r--r--python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.info8
3 files changed, 32 insertions, 30 deletions
diff --git a/python/python3-setuptools-git-versioning/README b/python/python3-setuptools-git-versioning/README
index c21cdfa783..1b326e7684 100644
--- a/python/python3-setuptools-git-versioning/README
+++ b/python/python3-setuptools-git-versioning/README
@@ -9,3 +9,11 @@ Features:
* Templates support a lot of substitutions including git and
environment information
* Well-documented
+
+NOTE: Will need to have PYTHONPATH set to use as slackware's tomli
+ package is too old and may cause problems. It will need to see
+ python3-tomli-opt. (only needed for python <3.11)
+
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
diff --git a/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.SlackBuild b/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.SlackBuild
index f7883a9169..013d1d03b5 100644
--- a/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.SlackBuild
+++ b/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for python3-setuptools-git-versioning
-# Copyright 2024 fourtysixandtwo <fourtysixandtwo@sliderr.net>
+# Copyright 2024-2025 fourtysixandtwo <fourtysixandtwo@sliderr.net>
# Copyright 2024, Alexander verbovetsky, Moscow, Russia
# All rights reserved.
#
@@ -26,7 +26,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-setuptools-git-versioning
-VERSION=${VERSION:-1.13.6}
+SRCNAM=setuptools_git_versioning
+VERSION=${VERSION:-2.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -48,45 +49,38 @@ 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"
-elif [ "$ARCH" = "aarch64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ${PRGNAM:8}-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/${PRGNAM:8}-$VERSION.tar.gz
-cd ${PRGNAM:8}-$VERSION
+rm -rf $SRCNAM-$VERSION
+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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# lower the version requirement so it does not break other builds if
+# setuptools_git_versioning is installed.
+sed -i 's/tomli>=2.0.1/tomli>=1.2.2/' requirements.txt
+sed -i 's/tomli>=2.0.1/tomli>=1.2.2/' PKG-INFO
+sed -i 's/tomli>=2.0.1/tomli>=1.2.2/' setuptools_git_versioning.egg-info/requires.txt
+
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
-python3 setup.py install --root=$PKG
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG.* README.* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE PKG-INFO README.* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.info b/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.info
index 6491469e55..e17ac14206 100644
--- a/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.info
+++ b/python/python3-setuptools-git-versioning/python3-setuptools-git-versioning.info
@@ -1,10 +1,10 @@
PRGNAM="python3-setuptools-git-versioning"
-VERSION="1.13.6"
+VERSION="2.1.0"
HOMEPAGE="https://setuptools-git-versioning.readthedocs.io"
-DOWNLOAD="https://github.com/dolfinus/setuptools-git-versioning/archive/v1.13.6/python3-setuptools-git-versioning-1.13.6.tar.gz"
-MD5SUM="40876457065d24ff4a048a4e1b6da912"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/s/setuptools_git_versioning/setuptools_git_versioning-2.1.0.tar.gz"
+MD5SUM="fa2116c239f9ffb655bdb4b6f2ff3bf4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3-toml"
+REQUIRES="python3-build python3-wheel python3-tomli-opt"
MAINTAINER="fourtysixandtwo"
EMAIL="fourtysixandtwo@sliderr.net"