From 1823436801858461f5bebded5e45d4d3170003e2 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 13 Nov 2024 13:10:58 +0100 Subject: [PATCH] i2c-tools: update to 4.4. --- .../patches/py-smbus_fix-destdir.patch | 35 ------------------- .../patches/py-smbus_use-setuptools.patch | 33 ----------------- srcpkgs/i2c-tools/template | 22 ++++++++---- 3 files changed, 16 insertions(+), 74 deletions(-) delete mode 100644 srcpkgs/i2c-tools/patches/py-smbus_fix-destdir.patch delete mode 100644 srcpkgs/i2c-tools/patches/py-smbus_use-setuptools.patch diff --git a/srcpkgs/i2c-tools/patches/py-smbus_fix-destdir.patch b/srcpkgs/i2c-tools/patches/py-smbus_fix-destdir.patch deleted file mode 100644 index f61e4122cd6..00000000000 --- a/srcpkgs/i2c-tools/patches/py-smbus_fix-destdir.patch +++ /dev/null @@ -1,35 +0,0 @@ -I had to add '--root' to the patch for it to not poison the masterdir. - That part will still be needed as a patch when the next version gets released. - -- 0x5c -original message below - -From a4609318b6fa594f970673d77397f1ca74b4120a Mon Sep 17 00:00:00 2001 -From: Morten Linderud -Date: Mon, 4 Oct 2021 20:01:53 +0200 -Subject: py-smbus/Module.mk: Install with PREFIX defined - -If we are building to a defined destdir py-smbus is going to ignore this -and try install to the actual root. This breaks packaging setups as the -install section would fail. - -Signed-off-by: Morten Linderud -Signed-off-by: Jean Delvare ---- - py-smbus/Module.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/py-smbus/Module.mk b/py-smbus/Module.mk -index 04ceb64..1e2ded1 100644 ---- a/py-smbus/Module.mk -+++ b/py-smbus/Module.mk -@@ -22,7 +22,7 @@ clean-python: - rm -rf py-smbus/build - - install-python: -- $(DISTUTILS) install -+ $(DISTUTILS) install --prefix="$(PREFIX)" --root="$(DESTDIR)" - - all: all-python - --- -cgit 1.2.3-1.el7 diff --git a/srcpkgs/i2c-tools/patches/py-smbus_use-setuptools.patch b/srcpkgs/i2c-tools/patches/py-smbus_use-setuptools.patch deleted file mode 100644 index c31e8757b4f..00000000000 --- a/srcpkgs/i2c-tools/patches/py-smbus_use-setuptools.patch +++ /dev/null @@ -1,33 +0,0 @@ -From cf3541b8a7ed50782edd05836020d31230fb86c6 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Wed, 19 Jan 2022 12:08:53 +0100 -Subject: py-smbus: Use setuptools instead of distutils - -As per [1], distutils is deprecated in Python 3.10 and will be removed -entirely in Python 3.12. - -As setuptools is essentially an enhanced version of distutils, it's -trivial to port to that. - -[1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated - -Signed-off-by: Ross Burton -Signed-off-by: Jean Delvare ---- - py-smbus/setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/py-smbus/setup.py b/py-smbus/setup.py -index 28a4500..26db33a 100644 ---- a/py-smbus/setup.py -+++ b/py-smbus/setup.py -@@ -1,6 +1,6 @@ - #!/usr/bin/env python - --from distutils.core import setup, Extension -+from setuptools import setup, Extension - - setup( name="smbus", - version="1.1", --- -cgit 1.2.3-1.el7 diff --git a/srcpkgs/i2c-tools/template b/srcpkgs/i2c-tools/template index 945521c0f96..a31e6ee801d 100644 --- a/srcpkgs/i2c-tools/template +++ b/srcpkgs/i2c-tools/template @@ -1,12 +1,11 @@ # Template file for 'i2c-tools' pkgname=i2c-tools -version=4.3 -revision=5 +version=4.4 +revision=1 build_style=gnu-makefile build_helper=python3 -make_build_args="EXTRA=py-smbus" -make_install_args="sbindir=/usr/bin EXTRA=py-smbus" -hostmakedepends="python3 python3-setuptools" +make_install_args="sbindir=/usr/bin" +hostmakedepends="python3 python3-build python3-installer python3-wheel" makedepends="python3-devel" depends="perl" short_desc="Heterogeneous set of I2C tools" @@ -14,11 +13,22 @@ maintainer="Leah Neukirchen " license="GPL-2.0-or-later" homepage="https://i2c.wiki.kernel.org/index.php/I2C_Tools" distfiles="https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tools-${version}.tar.xz" -checksum=1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9 +checksum=8b15f0a880ab87280c40cfd7235cfff28134bf14d5646c07518b1ff6642a2473 system_groups="i2c" +post_build() { + ( + cd py-smbus + python -m build --no-isolation --wheel . + ) +} + post_install() { vinstall "${FILESDIR}/45-i2c-tools.rules" 644 usr/lib/udev/rules.d + ( + cd py-smbus + python -m installer --destdir="$DESTDIR" dist/*.whl + ) } i2c-tools-devel_package() {