public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/hatch-vcs/files/, dev-python/hatch-vcs/, dev-python/nptyping/
@ 2023-02-13  3:02 Matt Turner
  0 siblings, 0 replies; only message in thread
From: Matt Turner @ 2023-02-13  3:02 UTC (permalink / raw
  To: gentoo-commits

commit:     2e43e38f24598f2626b6d4b0a6c0496ad284a8c3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 03:01:52 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 03:02:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e43e38f

dev-python/hatch-vcs: Add patch to fix test suite

Closes: https://bugs.gentoo.org/865513
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ....0-Work-with-setuptools_scm-7.1-fix-25-26.patch | 32 ++++++++++++++
 dev-python/hatch-vcs/hatch-vcs-0.3.0.ebuild        |  4 ++
 dev-python/nptyping/Manifest                       |  1 +
 dev-python/nptyping/nptyping-2.4.1.ebuild          | 50 ++++++++++++++++++++++
 4 files changed, 87 insertions(+)

diff --git a/dev-python/hatch-vcs/files/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch b/dev-python/hatch-vcs/files/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch
new file mode 100644
index 000000000000..919036acd720
--- /dev/null
+++ b/dev-python/hatch-vcs/files/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch
@@ -0,0 +1,32 @@
+From 47364faf5563df0eaa631ed10383817762c6b547 Mon Sep 17 00:00:00 2001
+From: Ben Beasley <code@musicinmybrain.net>
+Date: Thu, 5 Jan 2023 18:49:54 -0500
+Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25) (#26)
+
+Make test_write less brittle (see also #8, #9) so that it works with
+_version.py files generated by at least setuptools_scm 7.1, 7.0, and
+6.x.
+---
+ tests/test_build.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_build.py b/tests/test_build.py
+index 2fde601..7c76343 100644
+--- a/tests/test_build.py
++++ b/tests/test_build.py
+@@ -75,8 +75,10 @@ def test_write(new_project_write):
+     assert os.path.isfile(version_file)
+ 
+     lines = read_file(version_file).splitlines()
+-    assert lines[3].startswith(('version =', '__version__ ='))
+-    assert lines[3].endswith("version = '1.2.3'")
++    version_starts = ('version = ', '__version__ = ')
++    assert any(line.startswith(version_starts) for line in lines)
++    version_line = next(line for line in lines if line.startswith(version_starts))
++    assert version_line.endswith(" = '1.2.3'")
+ 
+ 
+ @pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
+-- 
+2.39.1
+

diff --git a/dev-python/hatch-vcs/hatch-vcs-0.3.0.ebuild b/dev-python/hatch-vcs/hatch-vcs-0.3.0.ebuild
index 56b375eb4b11..4f277c25e9ec 100644
--- a/dev-python/hatch-vcs/hatch-vcs-0.3.0.ebuild
+++ b/dev-python/hatch-vcs/hatch-vcs-0.3.0.ebuild
@@ -31,4 +31,8 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-Work-with-setuptools_scm-7.1-fix-25-26.patch
+)
+
 distutils_enable_tests pytest

diff --git a/dev-python/nptyping/Manifest b/dev-python/nptyping/Manifest
index 11a8f4320745..b2a3aad56dc5 100644
--- a/dev-python/nptyping/Manifest
+++ b/dev-python/nptyping/Manifest
@@ -1 +1,2 @@
 DIST nptyping-2.3.1.gh.tar.gz 66951 BLAKE2B 781e2e84b7d89337c4753a050e95f3f9cad3a1aca22ea235e203ebe231bfc7dc4e91f5455603c4f7fe833b7b97ea9e8e561eea62eef4d0b2dce4ade077b8526d SHA512 a80df18cba3d427668be0f44f3ca315cf80daf7e3aed90d76b159479de069054cb4a2442abf7b658ddc853736fc7c3be2b0d1db2d7c9e54938cb1883eb0cb2c9
+DIST nptyping-2.4.1.gh.tar.gz 71092 BLAKE2B a1d8bcea055b9d46c6891ed6b0aa0bba6abcdd04cd7ad3c4ff75bf69547be0c3df5abd6783e405bfc627d4d33cb71b8895ef854bff4e573561235012e8a4db0f SHA512 df2694743c5ee349f2dc2b119b38f2d0d5d38b51a0dcf8336c7e17bd9075e05e94d76d01a35156069a6c95310f69bca9040f972a7efa6e7e581503ad77730520

diff --git a/dev-python/nptyping/nptyping-2.4.1.ebuild b/dev-python/nptyping/nptyping-2.4.1.ebuild
new file mode 100644
index 000000000000..5408cf5b8bdd
--- /dev/null
+++ b/dev-python/nptyping/nptyping-2.4.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2022-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
+
+DESCRIPTION="Type hints for Numpy"
+HOMEPAGE="
+	https://pypi.org/project/nptyping/
+	https://github.com/ramonhagenaars/nptyping/
+"
+SRC_URI="
+	https://github.com/ramonhagenaars/nptyping/archive/v${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+	dev-python/numpy[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/typing-extensions[${PYTHON_USEDEP}]
+	' 3.8 3.9)
+"
+BDEPEND="
+	test? (
+		dev-python/mypy[${PYTHON_USEDEP}]
+		dev-python/typeguard[${PYTHON_USEDEP}]
+	)
+"
+
+EPYTEST_IGNORE=(
+	# TODO: package beartype?
+	tests/test_beartype.py
+	# TODO: package pyright?
+	tests/test_pyright.py
+	# test for... whether the release is on pypi?
+	# requires Internet + feedparser, meaningless for users
+	tests/test_package_info.py
+	# relies on Internet access to fetch packages for pip
+	tests/test_wheel.py
+)
+
+distutils_enable_tests pytest


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13  3:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13  3:02 [gentoo-commits] repo/gentoo:master commit in: dev-python/hatch-vcs/files/, dev-python/hatch-vcs/, dev-python/nptyping/ Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox