From 29394d0921808a94a409f01eff49f681651de5d5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 17 Feb 2023 08:06:58 +0000 Subject: gentoo auto-resync : 17:02:2023 - 08:06:58 --- dev-python/pyusb/Manifest | 4 ++- .../pyusb/files/pyusb-1.2.1-setuptools.patch | 37 ++++++++++++++++++++++ dev-python/pyusb/pyusb-1.2.1-r1.ebuild | 30 ++++++++++++++++++ dev-python/pyusb/pyusb-1.2.1.ebuild | 9 ++++-- 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 dev-python/pyusb/files/pyusb-1.2.1-setuptools.patch create mode 100644 dev-python/pyusb/pyusb-1.2.1-r1.ebuild (limited to 'dev-python/pyusb') diff --git a/dev-python/pyusb/Manifest b/dev-python/pyusb/Manifest index cea339172cd5..32ac18d403e7 100644 --- a/dev-python/pyusb/Manifest +++ b/dev-python/pyusb/Manifest @@ -1,3 +1,5 @@ +AUX pyusb-1.2.1-setuptools.patch 1457 BLAKE2B a60b6f4bb8abb3a4d59b325b8eff9af7c88fb093913ea9e8c81ada6bb70d303bc225ddadf2a7ee6308f3fade136d843b7c8d07dc139cd3c04352520a060cb515 SHA512 769e734d60224a2ee58e6192fc7dded8ab821df8360fb9cf0cd2cec0135f68b1aa6a1d996e42847300ca9ca9b00ef318124c53bddb2cf5e5b25523f24bb39cb8 DIST pyusb-1.2.1.tar.gz 75292 BLAKE2B c1b99f22919ab4beb8e96d664147dc51001c4a48b3acf9ba3961f7f53a9d13277c622e891481fd00b9d34d2ed8a2a0932b7949c13396ea4d76b36f36fcc4cdb0 SHA512 51d0c1165540afa21d6d0ab7315ac77b08083d1cb8e502173dfb1766bc542173f9d7b0070fd14bc71d147e31c3f0780b277093791a7c82485962a04ec62bf0f1 -EBUILD pyusb-1.2.1.ebuild 658 BLAKE2B 2fb3f613d02b09c249e89705e67af3235e0cf2ae785c262e21e0aa5acf33afcb072bbfe0817ae0ede6be303c1e8f158ea935ea5c8baa5b60cf349753a6be7fa5 SHA512 2503bc34a1e82c7baafbf27a06b767935401e8061a2b977178050001f02db91ba65df537ad4fe4e66c1d795d99bbb17ee5e13d54f2bcaa82578027241d0a1dea +EBUILD pyusb-1.2.1-r1.ebuild 695 BLAKE2B 9eb1dfc30bff8cbc3227acec37d6c03ab580f37072aac370ef40725fd202862eb516be3d27c7fdbbd9727615cebd642a6a2f3b6387996279467f0b990904069b SHA512 d5af365a2f9f8e73574d19581990ed393055dba3d0f89f03de246d5474b417b7be63a42fbf63e01ffaa205192fcd25cb187900feb1fb88e8d914254d766aedbf +EBUILD pyusb-1.2.1.ebuild 661 BLAKE2B 1a7254d0ee1582c38e6783385d8b9f14a5d7b29423558944d472974784aefc987c2d0a6f6aadde9cbd42b2ef244964a4601ecfdbcc4b2e6b18440d8f275483ff SHA512 629857d75efb65f106aa6fd30f42b8252c24f5fb6207d888d3e16aa29616ffa359789a56767169b084eb96781d6646e001a5b5e519102a3c341f55b08bf51937 MISC metadata.xml 360 BLAKE2B 2e5a76abee80f87f827d5231436612e05373c2b42a5e4e697806e5a1dcd2c86818408ccb730f5012625685afad19700be608589afb08b02aebc5edca0dbcdf33 SHA512 3d7d8c6cde60c5a057c6f6a004b8ca2166edc8a0a5c3371de15b63312c6ea161447bd2f65ff5c7c54f9477a2cef5d7534168d3785ffca019e9094eb16ac3ccf7 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 +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 new file mode 100644 index 000000000000..9f3ac1f4c29c --- /dev/null +++ b/dev-python/pyusb/pyusb-1.2.1-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +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/" + +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}" +} 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}" -- cgit v1.2.3