* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyusb/files/, dev-python/pyusb/
@ 2023-02-17 6:27 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-02-17 6:27 UTC (permalink / raw
To: gentoo-commits
commit: 485262e28f2aae4d6718cdbd8717841a1a0aa038
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 06:04:18 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 06:22:16 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=485262e2
dev-python/pyusb: enable py3.11, use pypi.eclass, fix w/ newer setuptools
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../pyusb/files/pyusb-1.2.1-setuptools.patch | 37 ++++++++++++++++++++++
dev-python/pyusb/pyusb-1.2.1.ebuild | 9 ++++--
2 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch b/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch
new file mode 100644
index 000000000000..26b5e204d648
--- /dev/null
+++ b/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch
@@ -0,0 +1,37 @@
+https://github.com/pyusb/pyusb/commit/777dea9d718e70d7323c821d4497c706b35742da
+
+From 777dea9d718e70d7323c821d4497c706b35742da Mon Sep 17 00:00:00 2001
+From: Jonas Malaco <jonas@protocubo.io>
+Date: Tue, 12 Jul 2022 03:12:50 -0300
+Subject: [PATCH] version: handle when patch component is missing
+
+actions/checkout@v3 (by default) no longer fetches the tags while
+checking out the repository. This, combined with our use of
+setuptools_scm post-release scheme, results in tox trying to run the
+tests with version strings that look something like
+
+ pyusb-0.0.post1+g3678fc1.zip
+
+and breaking _get_extended_version_info().
+
+Make _get_extended_version_info() robust against this case. This is
+preferable to configuring actions/checkout@v3 to fetch the tags as,
+being related shallow clones, it might also happen in other contexts.
+
+Fixes: 678fc1867f4 ("github: update to actions/checkout@v3")
+--- a/usb/__init__.py
++++ b/usb/__init__.py
+@@ -55,9 +55,9 @@
+
+ def _get_extended_version_info(version):
+ import re
+- m = re.match(r'(\d+)\.(\d+)\.(\d+)[.-]?(.*)', version)
+- major, minor, patch, suffix = m.groups()
+- return int(major), int(minor), int(patch), suffix
++ m = re.match(r'(\d+)\.(\d+)(\.(\d+))?[.-]?(.*)', version)
++ major, minor, _, patch, suffix = m.groups()
++ return int(major), int(minor), int(patch or "0"), suffix
+
+ extended_version_info = _get_extended_version_info(__version__)
+ version_info = extended_version_info[:3]
+
diff --git a/dev-python/pyusb/pyusb-1.2.1.ebuild b/dev-python/pyusb/pyusb-1.2.1.ebuild
index 900eb0c4252d..d7c303722986 100644
--- a/dev-python/pyusb/pyusb-1.2.1.ebuild
+++ b/dev-python/pyusb/pyusb-1.2.1.ebuild
@@ -3,12 +3,11 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..10} )
-inherit distutils-r1
+PYTHON_COMPAT=( python3_{9..11} )
+inherit distutils-r1 pypi
DESCRIPTION="USB support for Python"
HOMEPAGE="https://pyusb.github.io/pyusb/ https://pypi.org/project/pyusb/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
@@ -20,6 +19,10 @@ RDEPEND="${DEPEND}"
DOCS=( README.rst docs/tutorial.rst )
+PATCHES=(
+ "${FILESDIR}"/${P}-setuptools.patch
+)
+
python_test() {
cd tests || die
"${EPYTHON}" testall.py || die "Tests failed with ${EPYTHON}"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyusb/files/, dev-python/pyusb/
@ 2025-01-25 11:05 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2025-01-25 11:05 UTC (permalink / raw
To: gentoo-commits
commit: 9d9f1a2b93d52a4b38961cd4262db5a1dac4d2ea
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 10:56:20 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 11:05:39 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d9f1a2b
dev-python/pyusb: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pyusb/Manifest | 1 -
.../pyusb/files/pyusb-1.2.1-setuptools.patch | 37 ----------------------
dev-python/pyusb/pyusb-1.2.1-r1.ebuild | 30 ------------------
3 files changed, 68 deletions(-)
diff --git a/dev-python/pyusb/Manifest b/dev-python/pyusb/Manifest
index 8e1ede0ee4c0..af79195ad483 100644
--- a/dev-python/pyusb/Manifest
+++ b/dev-python/pyusb/Manifest
@@ -1,2 +1 @@
-DIST pyusb-1.2.1.tar.gz 75292 BLAKE2B c1b99f22919ab4beb8e96d664147dc51001c4a48b3acf9ba3961f7f53a9d13277c622e891481fd00b9d34d2ed8a2a0932b7949c13396ea4d76b36f36fcc4cdb0 SHA512 51d0c1165540afa21d6d0ab7315ac77b08083d1cb8e502173dfb1766bc542173f9d7b0070fd14bc71d147e31c3f0780b277093791a7c82485962a04ec62bf0f1
DIST pyusb-1.3.1.tar.gz 77281 BLAKE2B e86a24022e2ced4286500ca537d964cf974a47204fc70af6dd8993e039ccf47f710cb7a3564417bbd392cac0b4b06acc1de4ad8c880f782604ecae83ce87aae4 SHA512 91dad112b928133f7439c25ba473bfa8b214fc15daa37c8992304032766498694da5a84c8451d1ae007d0eeb9e840f700d071579324fb96d95302a1e6042e208
diff --git a/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch b/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch
deleted file mode 100644
index 26b5e204d648..000000000000
--- a/dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/pyusb/pyusb/commit/777dea9d718e70d7323c821d4497c706b35742da
-
-From 777dea9d718e70d7323c821d4497c706b35742da Mon Sep 17 00:00:00 2001
-From: Jonas Malaco <jonas@protocubo.io>
-Date: Tue, 12 Jul 2022 03:12:50 -0300
-Subject: [PATCH] version: handle when patch component is missing
-
-actions/checkout@v3 (by default) no longer fetches the tags while
-checking out the repository. This, combined with our use of
-setuptools_scm post-release scheme, results in tox trying to run the
-tests with version strings that look something like
-
- pyusb-0.0.post1+g3678fc1.zip
-
-and breaking _get_extended_version_info().
-
-Make _get_extended_version_info() robust against this case. This is
-preferable to configuring actions/checkout@v3 to fetch the tags as,
-being related shallow clones, it might also happen in other contexts.
-
-Fixes: 678fc1867f4 ("github: update to actions/checkout@v3")
---- a/usb/__init__.py
-+++ b/usb/__init__.py
-@@ -55,9 +55,9 @@
-
- def _get_extended_version_info(version):
- import re
-- m = re.match(r'(\d+)\.(\d+)\.(\d+)[.-]?(.*)', version)
-- major, minor, patch, suffix = m.groups()
-- return int(major), int(minor), int(patch), suffix
-+ m = re.match(r'(\d+)\.(\d+)(\.(\d+))?[.-]?(.*)', version)
-+ major, minor, _, patch, suffix = m.groups()
-+ return int(major), int(minor), int(patch or "0"), suffix
-
- extended_version_info = _get_extended_version_info(__version__)
- version_info = extended_version_info[:3]
-
diff --git a/dev-python/pyusb/pyusb-1.2.1-r1.ebuild b/dev-python/pyusb/pyusb-1.2.1-r1.ebuild
deleted file mode 100644
index 6e5a4090c905..000000000000
--- a/dev-python/pyusb/pyusb-1.2.1-r1.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
-inherit distutils-r1 pypi
-
-DESCRIPTION="USB support for Python"
-HOMEPAGE="https://pyusb.github.io/pyusb/ https://pypi.org/project/pyusb/"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv x86"
-
-### This version is compatible with both 0.X and 1.X versions of libusb
-DEPEND="virtual/libusb:="
-RDEPEND="${DEPEND}"
-
-DOCS=( README.rst docs/tutorial.rst )
-
-PATCHES=(
- "${FILESDIR}"/${P}-setuptools.patch
-)
-
-python_test() {
- cd tests || die
- "${EPYTHON}" testall.py || die "Tests failed with ${EPYTHON}"
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-25 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 11:05 [gentoo-commits] repo/gentoo:master commit in: dev-python/pyusb/files/, dev-python/pyusb/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2023-02-17 6:27 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox