#6 Update to 0.3.0 (close RHBZ#2152320)
Merged 2 years ago by music. Opened 2 years ago by music.
rpms/ music/python-hatch-vcs v0.3  into  rawhide

file modified
+1
@@ -1,1 +1,2 @@ 

  /hatch_vcs-0.2.0.tar.gz

+ /hatch_vcs-0.3.0.tar.gz

file removed
-197
@@ -1,197 +0,0 @@ 

- From 22af1c13f637587c0182b3363e98d15f7e150eb7 Mon Sep 17 00:00:00 2001

- From: Lumir Balhar <lbalhar@redhat.com>

- Date: Thu, 30 Jun 2022 14:05:02 +0200

- Subject: [PATCH 1/6] Fix test compatibility with setuptools_scm 7

- 

- ---

-  hatch.toml          | 1 +

-  tests/test_build.py | 8 +++++++-

-  2 files changed, 8 insertions(+), 1 deletion(-)

- 

- diff --git a/hatch.toml b/hatch.toml

- index 269801a..22c9f86 100644

- --- a/hatch.toml

- +++ b/hatch.toml

- @@ -1,5 +1,6 @@

-  [envs.default]

-  dependencies = [

- +  "importlib-metadata",

-    "pytest",

-    "pytest-cov",

-  ]

- diff --git a/tests/test_build.py b/tests/test_build.py

- index 2d719a9..a4f88fd 100644

- --- a/tests/test_build.py

- +++ b/tests/test_build.py

- @@ -6,9 +6,12 @@

-  import zipfile

-  

-  import pytest

- +from importlib_metadata import version

-  

-  from .utils import build_project, read_file

-  

- +setuptools_scm_major = int(version("setuptools_scm").split(".")[0])

- +

-  

-  def test_basic(new_project_basic):

-      build_project('-t', 'wheel')

- @@ -75,7 +78,10 @@ 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'"

- +    if setuptools_scm_major < 7:

- +        assert lines[3] == "version = '1.2.3'"

- +    else:

- +        assert lines[3] == "__version__ = 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')

- 

- From 234285322bc655885da1cebed510bba6c7960232 Mon Sep 17 00:00:00 2001

- From: Lumir Balhar <lbalhar@redhat.com>

- Date: Thu, 30 Jun 2022 22:35:53 +0200

- Subject: [PATCH 2/6] Revert "Fix test compatibility with setuptools_scm 7"

- 

- This reverts commit 22af1c13f637587c0182b3363e98d15f7e150eb7.

- ---

-  hatch.toml          | 1 -

-  tests/test_build.py | 8 +-------

-  2 files changed, 1 insertion(+), 8 deletions(-)

- 

- diff --git a/hatch.toml b/hatch.toml

- index 22c9f86..269801a 100644

- --- a/hatch.toml

- +++ b/hatch.toml

- @@ -1,6 +1,5 @@

-  [envs.default]

-  dependencies = [

- -  "importlib-metadata",

-    "pytest",

-    "pytest-cov",

-  ]

- diff --git a/tests/test_build.py b/tests/test_build.py

- index a4f88fd..2d719a9 100644

- --- a/tests/test_build.py

- +++ b/tests/test_build.py

- @@ -6,12 +6,9 @@

-  import zipfile

-  

-  import pytest

- -from importlib_metadata import version

-  

-  from .utils import build_project, read_file

-  

- -setuptools_scm_major = int(version("setuptools_scm").split(".")[0])

- -

-  

-  def test_basic(new_project_basic):

-      build_project('-t', 'wheel')

- @@ -78,10 +75,7 @@ def test_write(new_project_write):

-      assert os.path.isfile(version_file)

-  

-      lines = read_file(version_file).splitlines()

- -    if setuptools_scm_major < 7:

- -        assert lines[3] == "version = '1.2.3'"

- -    else:

- -        assert lines[3] == "__version__ = version = '1.2.3'"

- +    assert lines[3] == "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')

- 

- From 46b2c3e21ad229887ad4bf20c24b5ff5ad3e3c0e Mon Sep 17 00:00:00 2001

- From: Lumir Balhar <lbalhar@redhat.com>

- Date: Thu, 30 Jun 2022 22:39:39 +0200

- Subject: [PATCH 3/6] Fix test compatibility with setuptools_scm 7

- 

- ---

-  tests/test_build.py | 3 ++-

-  1 file changed, 2 insertions(+), 1 deletion(-)

- 

- diff --git a/tests/test_build.py b/tests/test_build.py

- index 2d719a9..ca82d9d 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 =") or lines[3].startswith("__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')

- 

- From d25f23e0c598c7f4a1c699b9b9aa83a24cdbd505 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?=

-  <frenzy.madness@gmail.com>

- Date: Thu, 30 Jun 2022 22:43:44 +0200

- Subject: [PATCH 4/6] Update tests/test_build.py

- 

- Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>

- ---

-  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 ca82d9d..303c76d 100644

- --- a/tests/test_build.py

- +++ b/tests/test_build.py

- @@ -75,7 +75,7 @@ def test_write(new_project_write):

-      assert os.path.isfile(version_file)

-  

-      lines = read_file(version_file).splitlines()

- -    assert lines[3].startswith("version =") or lines[3].startswith("__version__ =")

- +    assert lines[3].startswith(("version =", "__version__ =")) 

-      assert lines[3].endswith("version = '1.2.3'")

-  

-  

- 

- From 58ac821346b83c2786afef907eb76fed515c37fe Mon Sep 17 00:00:00 2001

- From: Ofek Lev <ofekmeister@gmail.com>

- Date: Thu, 21 Jul 2022 00:13:45 -0400

- Subject: [PATCH 5/6] Apply suggestions from code review

- 

- ---

-  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 303c76d..e00665f 100644

- --- a/tests/test_build.py

- +++ b/tests/test_build.py

- @@ -75,7 +75,7 @@ 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].startswith(('version =', '__version__ =')) 

-      assert lines[3].endswith("version = '1.2.3'")

-  

-  

- 

- From c8dd05568daad8d43bc3f5eba59252130e43258e Mon Sep 17 00:00:00 2001

- From: Ofek Lev <ofekmeister@gmail.com>

- Date: Thu, 21 Jul 2022 00:16:39 -0400

- Subject: [PATCH 6/6] Apply suggestions from code review

- 

- ---

-  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 e00665f..6b907ef 100644

- --- a/tests/test_build.py

- +++ b/tests/test_build.py

- @@ -75,7 +75,7 @@ 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].startswith(('version =', '__version__ ='))

-      assert lines[3].endswith("version = '1.2.3'")

-  

-  

file modified
+3 -15
@@ -1,5 +1,5 @@ 

  # Let’s try to build this as early as we can, since it’s a dependency for

- # python-userpath.

+ # some important libraries, such as python-platformdirs.

  %bcond_with bootstrap

  %if %{without bootstrap}

  %bcond_without tests
@@ -8,7 +8,7 @@ 

  %endif

  

  Name:           python-hatch-vcs

- Version:        0.2.0

+ Version:        0.3.0

  Release:        %autorelease

  Summary:        Hatch plugin for versioning with your preferred VCS

  
@@ -19,18 +19,7 @@ 

  

  BuildArch:      noarch

  

- # Fix test compatibility with setuptools_scm 7

- # https://github.com/ofek/hatch-vcs/pull/9

- #

- # Fixes:

- #

- # Compatibility with setuptools_scm 7

- # https://github.com/ofek/hatch-vcs/issues/8

- Patch:          %{url}/pull/9.patch

- 

  BuildRequires:  python3-devel

- # RHBZ#1985340, RHBZ#2076994

- BuildRequires:  pyproject-rpm-macros >= 1.2.0

  

  %if %{with tests}

  BuildRequires:  python3dist(pytest)
@@ -51,7 +40,7 @@ 

  

  

  %prep

- %autosetup -n hatch_vcs-%{version} -p1

+ %autosetup -n hatch_vcs-%{version}

  

  

  %generate_buildrequires
@@ -76,7 +65,6 @@ 

  

  

  %files -n python3-hatch-vcs -f %{pyproject_files}

- %license LICENSE.txt

  %doc HISTORY.md

  %doc README.md

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (hatch_vcs-0.2.0.tar.gz) = 3eb0b04022d4801a982d90a3a0e34e59fcf7dd04c0c2db91c0306b4187ba466ac85ecbb80943a35f4a6a4912bc2ddf2633fab897e8820f5e1ee9d200147b5faf

+ SHA512 (hatch_vcs-0.3.0.tar.gz) = 06a80e90b45b1316b42845808d04d00d00356f42d32f02d934db0aa9df05efa2f692413709e0dd5465f447829f2f5410110fbbeb826bafdea1f1014e3096e056

  • We can now rely on pyproject-rpm-macros >= 1.2.0
  • The LICENSE.txt file is now handled in pyproject_files
  • The setuptools_scm 7 patch is now merged upstream

There should be no incompatible changes, but I’m going to try this out in COPR.

Build succeeded.

## 0.3.0 - 2022-12-10

***Changed:***

- Drop support for Python 2

***Added:***

- Add a metadata hook for injecting VCS metadata
- Bump the minimum supported version of Hatchling

## 0.2.1 - 2022-12-06

***Fixed:***

- Allow `root` in `raw-options`

Pull-Request has been merged by music

2 years ago