From 9b8aa7e5d4fc162c0e68ac944bc03e4061dac4ec Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 6 Jul 2023 22:35:32 -0400 Subject: [PATCH 1/4] Use new (rpm 4.17.1+) bcond style --- python-hatch-vcs.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python-hatch-vcs.spec b/python-hatch-vcs.spec index e2fa14b..2e74dce 100644 --- a/python-hatch-vcs.spec +++ b/python-hatch-vcs.spec @@ -1,11 +1,7 @@ # Let’s try to build this as early as we can, since it’s a dependency for # some important libraries, such as python-platformdirs. -%bcond_with bootstrap -%if %{without bootstrap} -%bcond_without tests -%else -%bcond_with tests -%endif +%bcond bootstrap 0 +%bcond tests %{without bootstrap} Name: python-hatch-vcs Version: 0.3.0 From c6453dc06b899aca15311ec6b6bee1d0651d7d6e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 27 May 2023 12:38:23 -0400 Subject: [PATCH 2/4] Do not number the sole Source [skip changelog] --- python-hatch-vcs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-hatch-vcs.spec b/python-hatch-vcs.spec index 2e74dce..bf9a520 100644 --- a/python-hatch-vcs.spec +++ b/python-hatch-vcs.spec @@ -11,7 +11,7 @@ Summary: Hatch plugin for versioning with your preferred VCS # SPDX License: MIT URL: https://github.com/ofek/hatch-vcs -Source0: %{pypi_source hatch_vcs} +Source: %{pypi_source hatch_vcs} BuildArch: noarch From 4798795659831eeabd15cfcda7e6ac58e090486a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 19 Dec 2022 20:38:33 -0500 Subject: [PATCH 3/4] Update to 0.4.0 (close RHBZ#2248106) --- .gitignore | 1 + python-hatch-vcs.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2c911ae..6afbdf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /hatch_vcs-0.2.0.tar.gz /hatch_vcs-0.2.1.tar.gz /hatch_vcs-0.3.0.tar.gz +/hatch_vcs-0.4.0.tar.gz diff --git a/python-hatch-vcs.spec b/python-hatch-vcs.spec index bf9a520..1b22bbb 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 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 From 0e03e0b735f55b8f69c6139c7e17df37c8caff6c Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Thu, 16 Nov 2023 20:08:19 +0300 Subject: [PATCH 4/4] Remove unnecessary files and fix spec-file --- README.md | 3 - SPECS/python-hatch-vcs.spec | 121 ++++++++++++++++++++++++++++++++++++ python-hatch-vcs.spec | 75 ---------------------- sources | 1 - 4 files changed, 121 insertions(+), 79 deletions(-) delete mode 100644 README.md create mode 100644 SPECS/python-hatch-vcs.spec delete mode 100644 python-hatch-vcs.spec delete mode 100644 sources diff --git a/README.md b/README.md deleted file mode 100644 index 2307b34..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-hatch-vcs - -The python-hatch-vcs package diff --git a/SPECS/python-hatch-vcs.spec b/SPECS/python-hatch-vcs.spec new file mode 100644 index 0000000..5d7857c --- /dev/null +++ b/SPECS/python-hatch-vcs.spec @@ -0,0 +1,121 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# Let’s try to build this as early as we can, since it’s a dependency for +# some important libraries, such as python-platformdirs. +%bcond bootstrap 0 +%bcond tests %{without bootstrap} + +Name: python-hatch-vcs +Version: 0.4.0 +Release: %autorelease +Summary: Hatch plugin for versioning with your preferred VCS + +# SPDX +License: MIT +URL: https://github.com/ofek/hatch-vcs +Source: %{pypi_source hatch_vcs} + +BuildArch: noarch + +BuildRequires: python3-devel + +%if %{with tests} +BuildRequires: python3dist(pytest) +BuildRequires: git-core +%endif + +%global common_description %{expand: +This provides a plugin for Hatch that uses your preferred version control +system (like Git) to determine project versions.} + +%description %{common_description} + + +%package -n python3-hatch-vcs +Summary: %{summary} + +%description -n python3-hatch-vcs %{common_description} + + +%prep +%autosetup -n hatch_vcs-%{version} +# EPEL9-specific: allow python-setuptools_scm 6.0.1 +sed -r -i 's/(setuptools-scm>=6\.)4\.0/\10\.1/' pyproject.toml + + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files hatch_vcs + + +%check +%if %{with tests} +# EPEL9: This test fails with setuptools-scm < 6.4.0. Upstream assumes that +# happens only for Python 2 (and skips the test accordingly), but we have +# allowed setuptools-scm 6.0.1 on Python 3 as well. +k="${k-}${k+ and }not test_fallback" +%pytest -k "${k-}" +%else +%pyproject_check_import +%endif + + +%files -n python3-hatch-vcs -f %{pyproject_files} +%doc HISTORY.md +%doc README.md + + +%changelog +* Mon Nov 06 2023 Benjamin A. Beasley - 0.4.0-1 +- Update to 0.4.0 (close RHBZ#2248106) + +* Mon Nov 06 2023 Benjamin A. Beasley - 0.3.0-2 +- Use new (rpm 4.17.1+) bcond style + +* Tue Jul 25 2023 Benjamin A. Beasley - 0.3.0-1 +- Update to 0.3.0 (close RHBZ#2152320) +- 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 + +* Tue Jul 25 2023 Benjamin A. Beasley - 0.2.1-2 +- Use hatchling’s new “prepare_metadata_…” hook support for BR’s + +* Tue Feb 14 2023 Benjamin A. Beasley - 0.2.1-1 +- Update to 0.2.1 + +* Tue Feb 14 2023 Benjamin A. Beasley - 0.2.0-6 +- EPEL9: allow python-setuptools_scm 6.0.1 +- Skip test_fallback, as upstream does for Python 2.7, due to the + downgraded setuptools-scm version. + +* Tue Feb 14 2023 Benjamin A. Beasley - 0.2.0-5 +- Confirm License is SPDX MIT + +* Sun Sep 11 2022 Benjamin A. Beasley - 0.2.0-4 +- Fix extra newline in description + +* Fri May 06 2022 Benjamin A. Beasley - 0.2.0-3 +- Use wheel-building support to generate BR’s + +* Sun May 01 2022 Benjamin A. Beasley - 0.2.0-2 +- Adjust for pyproject-rpm-macros >= 1.1.0 + +* Fri Apr 22 2022 Benjamin A. Beasley - 0.2.0-1 +- Initial package (close RHBZ#2077832) diff --git a/python-hatch-vcs.spec b/python-hatch-vcs.spec deleted file mode 100644 index 1b22bbb..0000000 --- a/python-hatch-vcs.spec +++ /dev/null @@ -1,75 +0,0 @@ -# Let’s try to build this as early as we can, since it’s a dependency for -# some important libraries, such as python-platformdirs. -%bcond bootstrap 0 -%bcond tests %{without bootstrap} - -Name: python-hatch-vcs -Version: 0.4.0 -Release: %autorelease -Summary: Hatch plugin for versioning with your preferred VCS - -# SPDX -License: MIT -URL: https://github.com/ofek/hatch-vcs -Source: %{pypi_source hatch_vcs} - -BuildArch: noarch - -BuildRequires: python3-devel - -%if %{with tests} -BuildRequires: python3dist(pytest) -BuildRequires: git-core -%endif - -%global common_description %{expand: -This provides a plugin for Hatch that uses your preferred version control -system (like Git) to determine project versions.} - -%description %{common_description} - - -%package -n python3-hatch-vcs -Summary: %{summary} - -%description -n python3-hatch-vcs %{common_description} - - -%prep -%autosetup -n hatch_vcs-%{version} -# EPEL9-specific: allow python-setuptools_scm 6.0.1 -sed -r -i 's/(setuptools-scm>=6\.)4\.0/\10\.1/' pyproject.toml - - -%generate_buildrequires -%pyproject_buildrequires - - -%build -%pyproject_wheel - - -%install -%pyproject_install -%pyproject_save_files hatch_vcs - - -%check -%if %{with tests} -# EPEL9: This test fails with setuptools-scm < 6.4.0. Upstream assumes that -# happens only for Python 2 (and skips the test accordingly), but we have -# allowed setuptools-scm 6.0.1 on Python 3 as well. -k="${k-}${k+ and }not test_fallback" -%pytest -k "${k-}" -%else -%pyproject_check_import -%endif - - -%files -n python3-hatch-vcs -f %{pyproject_files} -%doc HISTORY.md -%doc README.md - - -%changelog -%autochangelog diff --git a/sources b/sources deleted file mode 100644 index 344d2b6..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (hatch_vcs-0.4.0.tar.gz) = 8689d3939b384b66c8153b88e82c55c4ec59a971dae6138c8d70995d332d62c870d611f0be5d2e47640f6c80cb55d1d8e556d6b3f0085f94dd505aaf7fdb93bd