Work with setuptools_scm 8.0
This commit is contained in:
parent
bfc8e9c9c1
commit
aa188172bc
32
51.patch
Normal file
32
51.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From d2d0c13f0887684510c9bce18f3871ee73b63bf8 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 22 Sep 2023 06:56:48 -0400
|
||||
Subject: [PATCH] Work with setuptools_scm 8.0 (fix #50)
|
||||
|
||||
Make test_write even less brittle (see also #8, #9, #25) so that it
|
||||
works with _version.py files generated by at least setuptools_scm 8.0,
|
||||
7.1, 7.0, and 6.4.
|
||||
|
||||
This is required because setuptools_scm 8.0 added a type-checking
|
||||
comment at the end of the version line.
|
||||
|
||||
Based on:
|
||||
|
||||
https://src.fedoraproject.org/fork/lbalhar/rpms/python-hatch-vcs/c/ca6e8a95dbe50da64ba98c4e0829ae00ccd8025a
|
||||
---
|
||||
tests/test_build.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_build.py b/tests/test_build.py
|
||||
index 7c76343..42bd0c4 100644
|
||||
--- a/tests/test_build.py
|
||||
+++ b/tests/test_build.py
|
||||
@@ -78,7 +78,7 @@ def test_write(new_project_write):
|
||||
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'")
|
||||
+ assert " = '1.2.3'" in version_line
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
|
||||
@ -18,6 +18,9 @@ BuildArch: noarch
|
||||
# Work with setuptools_scm 7.1 (fix #25)
|
||||
# https://github.com/ofek/hatch-vcs/pull/26
|
||||
Patch: %{url}/pull/26.patch
|
||||
# Work with setuptools_scm 8.0 (fix #50)
|
||||
# https://github.com/ofek/hatch-vcs/pull/51
|
||||
Patch: %{url}/pull/51.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user