diff --git a/.gitignore b/.gitignore index b156745..d56018a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /hatch_vcs-0.2.0.tar.gz /hatch_vcs-0.3.0.tar.gz +/hatch_vcs-0.4.0.tar.gz diff --git a/26.patch b/26.patch deleted file mode 100644 index b1cc55a..0000000 --- a/26.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2bf0d32f92f6609258f85131b94d0952fc0ec149 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Mon, 19 Dec 2022 20:20:11 -0500 -Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25) - -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') diff --git a/51.patch b/51.patch deleted file mode 100644 index 5d7cdf2..0000000 --- a/51.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d2d0c13f0887684510c9bce18f3871ee73b63bf8 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -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') diff --git a/python-hatch-vcs.spec b/python-hatch-vcs.spec index e95ef2b..1601817 100644 --- a/python-hatch-vcs.spec +++ b/python-hatch-vcs.spec @@ -4,7 +4,7 @@ %bcond tests %{without bootstrap} Name: python-hatch-vcs -Version: 0.3.0 +Version: 0.4.0 Release: %autorelease Summary: Hatch plugin for versioning with your preferred VCS @@ -15,13 +15,6 @@ Source: %{pypi_source hatch_vcs} 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 %if %{with tests} @@ -43,7 +36,7 @@ Summary: %{summary} %prep -%autosetup -n hatch_vcs-%{version} -p1 +%autosetup -n hatch_vcs-%{version} %generate_buildrequires diff --git a/sources b/sources index 7f2b55e..344d2b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hatch_vcs-0.3.0.tar.gz) = 06a80e90b45b1316b42845808d04d00d00356f42d32f02d934db0aa9df05efa2f692413709e0dd5465f447829f2f5410110fbbeb826bafdea1f1014e3096e056 +SHA512 (hatch_vcs-0.4.0.tar.gz) = 8689d3939b384b66c8153b88e82c55c4ec59a971dae6138c8d70995d332d62c870d611f0be5d2e47640f6c80cb55d1d8e556d6b3f0085f94dd505aaf7fdb93bd