Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions python/python3-intervaltree/python3-intervaltree.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Slackware build script for python3-intervaltree

# Copyright 2023 Isaac Yu <isaacyu@protonmail.com>
# Copyright 2023-2026 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
Expand All @@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=python3-intervaltree
VERSION=${VERSION:-3.1.0}
VERSION=${VERSION:-3.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
Expand All @@ -49,20 +49,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
Expand All @@ -78,13 +64,23 @@ 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
# Remove python3-uv-dynamic-versioning dependency
# Code taken from Arch Linux repo:
# https://gitlab.archlinux.org/archlinux/packaging/packages/python-intervaltree
patch -Np1 < $CWD/remove-uv-dynamic-versioning.patch
sed -i "s/@VERSION@/$VERSION/" pyproject.toml

PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export PYTHONPATH=/opt/python$PYVER/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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md HACKING.md LICENSE.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md HACKING.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
Expand Down
8 changes: 4 additions & 4 deletions python/python3-intervaltree/python3-intervaltree.info
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PRGNAM="python3-intervaltree"
VERSION="3.1.0"
VERSION="3.2.1"
HOMEPAGE="https://github.com/chaimleib/intervaltree"
DOWNLOAD="https://github.com/chaimleib/intervaltree/archive/v3.1.0/intervaltree-3.1.0.tar.gz"
MD5SUM="29bd8a7e0c1350e335c0fc4f6572c931"
DOWNLOAD="https://github.com/chaimleib/intervaltree/archive/3.2.1/intervaltree-3.2.1.tar.gz"
MD5SUM="fca2350c19b9e928c30087ddf752e498"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-sortedcontainers"
REQUIRES="python3-hatchling python3-sortedcontainers"
MAINTAINER="Isaac Yu"
EMAIL="isaacyu@protonmail.com"
24 changes: 24 additions & 0 deletions python/python3-intervaltree/remove-uv-dynamic-versioning.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- intervaltree-3.2.1.orig/pyproject.toml 2026-01-05 03:30:00.213908569 +0100
+++ intervaltree-3.2.1/pyproject.toml 2026-01-05 03:31:18.272187043 +0100
@@ -1,19 +1,11 @@
[build-system]
-requires = ["hatchling", "uv-dynamic-versioning"]
+requires = ["hatchling"]
build-backend = "hatchling.build"

-[tool.uv-dynamic-versioning]
-pattern = "default-unprefixed"
-# test.pypi.org won't accept anything after a +, so metadata has to go :(
-metadata = false
-
-[tool.hatch.version]
-source = "uv-dynamic-versioning"
-
[project]
name = "intervaltree"
description = 'Editable interval tree data structure for Python 2 and 3'
-dynamic = ['version']
+version = "@VERSION@"
authors = [
{ name="Chaim Leib Halbert", email="chaim.leib.halbert@gmail.com" },
{ name="Konstantin Tretyakov" },