- Add fix-tests-setuptools-scm7.patch upstream patch to support setuptools_scm
7 gh#ofek/hatch-vcs#9 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch_vcs?expand=0&rev=5
This commit is contained in:
parent
5d4a160269
commit
21b1a32b80
14
fix-tests-setuptools-scm7.patch
Normal file
14
fix-tests-setuptools-scm7.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/tests/test_build.py b/tests/test_build.py
|
||||||
|
index 2d719a9..6b907ef 100644
|
||||||
|
--- a/tests/test_build.py
|
||||||
|
+++ b/tests/test_build.py
|
||||||
|
@@ -75,7 +75,8 @@ def test_write(new_project_write):
|
||||||
|
assert os.path.isfile(version_file)
|
||||||
|
|
||||||
|
lines = read_file(version_file).splitlines()
|
||||||
|
- assert lines[3] == "version = '1.2.3'"
|
||||||
|
+ assert lines[3].startswith(('version =', '__version__ ='))
|
||||||
|
+ assert lines[3].endswith("version = '1.2.3'")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 11 12:02:43 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add fix-tests-setuptools-scm7.patch upstream patch to support setuptools_scm
|
||||||
|
7 gh#ofek/hatch-vcs#9
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 20 11:44:34 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Wed Jul 20 11:44:34 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -25,11 +25,13 @@ Summary: Hatch plugin for versioning with your preferred VCS
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/ofek/hatch-vcs
|
URL: https://github.com/ofek/hatch-vcs
|
||||||
Source: https://files.pythonhosted.org/packages/source/h/hatch_vcs/hatch_vcs-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/h/hatch_vcs/hatch_vcs-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM fix-tests-setuptools-scm7.patch gh#ofek/hatch-vcs#9
|
||||||
|
Patch0: fix-tests-setuptools-scm7.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros >= 20210929
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
Requires: python-hatchling >= 0.21.0
|
Requires: python-hatchling >= 0.21.0
|
||||||
# https://github.com/ofek/hatch-vcs/issues/8
|
# https://github.com/ofek/hatch-vcs/issues/8
|
||||||
Requires: (python-setuptools_scm >= 6.4.0 with python-setuptools_scm < 7)
|
Requires: (python-setuptools_scm >= 6.4.0)
|
||||||
Provides: python-hatch-vcs = %{version}-%{info}
|
Provides: python-hatch-vcs = %{version}-%{info}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION build
|
# SECTION build
|
||||||
@ -37,7 +39,7 @@ BuildRequires: %{python_module hatchling >= 0.21.0}
|
|||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
# SECTION test
|
# SECTION test
|
||||||
BuildRequires: %{python_module setuptools_scm >= 6.4.0 with %python-setuptools_scm < 7}
|
BuildRequires: %{python_module setuptools_scm >= 6.4.0}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
# /SECTION
|
# /SECTION
|
||||||
@ -47,7 +49,7 @@ BuildRequires: git
|
|||||||
This provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions.
|
This provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n hatch_vcs-%{version}
|
%autosetup -p1 -n hatch_vcs-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user