Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-hatch_vcs for 
openSUSE:Factory checked in at 2022-11-12 17:40:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hatch_vcs (Old)
 and      /work/SRC/openSUSE:Factory/.python-hatch_vcs.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hatch_vcs"

Sat Nov 12 17:40:14 2022 rev:2 rq:1035229 version:0.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hatch_vcs/python-hatch_vcs.changes        
2022-07-21 11:33:45.314969154 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-hatch_vcs.new.1597/python-hatch_vcs.changes  
    2022-11-12 17:40:25.677903244 +0100
@@ -1,0 +2,6 @@
+Fri Nov 11 12:02:43 UTC 2022 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add fix-tests-setuptools-scm7.patch upstream patch to support setuptools_scm
+  7 gh#ofek/hatch-vcs#9
+
+-------------------------------------------------------------------

New:
----
  fix-tests-setuptools-scm7.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-hatch_vcs.spec ++++++
--- /var/tmp/diff_new_pack.oscdnO/_old  2022-11-12 17:40:26.285906864 +0100
+++ /var/tmp/diff_new_pack.oscdnO/_new  2022-11-12 17:40:26.289906888 +0100
@@ -25,11 +25,13 @@
 License:        MIT
 URL:            https://github.com/ofek/hatch-vcs
 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:  python-rpm-macros >= 20210929
 Requires:       python-hatchling >= 0.21.0
 # 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}
 BuildArch:      noarch
 # SECTION build
@@ -37,7 +39,7 @@
 BuildRequires:  %{python_module pip}
 # /SECTION
 # 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:  git
 # /SECTION
@@ -47,7 +49,7 @@
 This provides a plugin for Hatch that uses your preferred version control 
system (like Git) to determine project versions.
 
 %prep
-%setup -q -n hatch_vcs-%{version}
+%autosetup -p1 -n hatch_vcs-%{version}
 
 %build
 %pyproject_wheel

++++++ fix-tests-setuptools-scm7.patch ++++++
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')

Reply via email to