commit d3690c45022a8283be2470a8e9199605e2b44595 Author: Adrian Schröter Date: Fri Jul 12 12:19:14 2024 +0200 Sync from SUSE:ALP:Source:Standard:1.0 saltbundlepy-hatch-vcs revision 0c39e5fa98a31612d71c35aebc6bb9b1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..83bd4e9 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/_service b/_service new file mode 100644 index 0000000..d648e71 --- /dev/null +++ b/_service @@ -0,0 +1,4 @@ + + + + diff --git a/hatch_vcs-0.3.0.tar.gz b/hatch_vcs-0.3.0.tar.gz new file mode 100644 index 0000000..c6ebdcc --- /dev/null +++ b/hatch_vcs-0.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee +size 10172 diff --git a/saltbundlepy-hatch-vcs.changes b/saltbundlepy-hatch-vcs.changes new file mode 100644 index 0000000..fa78439 --- /dev/null +++ b/saltbundlepy-hatch-vcs.changes @@ -0,0 +1,58 @@ +------------------------------------------------------------------- +Wed Aug 16 13:58:58 UTC 2023 - Victor Zhestkov + +- Add fix tests with newer setuptools + +- Added: + * setuptools7x-tests.patch + +------------------------------------------------------------------- +Mon Feb 27 09:05:31 UTC 2023 - Matej Cepl + +- The test build branch MUST BR the package itself. + +------------------------------------------------------------------- +Tue Feb 21 08:48:31 UTC 2023 - Matej Cepl + +- Switch to _multibuild to avoid a build cycle with pytest. + +------------------------------------------------------------------- +Sat Dec 10 17:00:57 UTC 2022 - Johannes Kastl + +- update to 0.3.0: + * Changed + - Drop support for Python 2 + * Added + - Add a metadata hook for injecting VCS metadata + - Bump the minimum supported version of Hatchling + +------------------------------------------------------------------- +Wed Dec 7 06:34:23 UTC 2022 - Johannes Kastl + +- update to 0.2.1: + * Fixed: + - Allow root in raw-options +- drop patch fix-tests-setuptools-scm7.patch + +------------------------------------------------------------------- +Fri Nov 11 12:02:43 UTC 2022 - Daniel Garcia + +- 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 + +- Cleanup spec file even more +- Fix requirements: prevent setuptools_scm 7 update +- Provide the canonical PyPI name + +------------------------------------------------------------------- +Tue Jul 19 14:22:34 UTC 2022 - Matej Cepl + +- Cleanup the SPEC file. + +------------------------------------------------------------------- +Tue Jul 19 09:27:06 UTC 2022 - Johannes Kastl + +- new package python-hatch_vcs diff --git a/saltbundlepy-hatch-vcs.spec b/saltbundlepy-hatch-vcs.spec new file mode 100644 index 0000000..b8d83fd --- /dev/null +++ b/saltbundlepy-hatch-vcs.spec @@ -0,0 +1,90 @@ +# +# spec file for package saltbundlepy-hatch-vcs +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}} +%define pythons saltbundlepy + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: saltbundlepy-hatch-vcs%{psuffix} +Version: 0.3.0 +Release: 0 +Summary: Hatch plugin for versioning with your preferred VCS +License: MIT +URL: https://github.com/ofek/hatch-vcs +Source: https://files.pythonhosted.org/packages/source/h/hatch_vcs/hatch_vcs-%{version}.tar.gz +Patch1: setuptools7x-tests.patch +BuildRequires: fdupes +BuildRequires: saltbundlepy-rpm-macros +# https://github.com/ofek/hatch-vcs/issues/8 +Requires: saltbundlepy-setuptools-scm >= 6.4.0 +Requires: saltbundlepy-hatchling >= 0.21.0 +BuildArch: noarch +# SECTION build +BuildRequires: %{saltbundlepy_module hatchling >= 0.21.0} +BuildRequires: %{saltbundlepy_module pip} +# /SECTION +%if %{with test} +# SECTION test +%if "%_vendor" == "debbuild" +BuildRequires: %{saltbundlepy_module hatch-vcs >= %{version}-~} +%else +BuildRequires: %{saltbundlepy_module hatch-vcs = %{version}} +%endif +BuildRequires: %{saltbundlepy_module pytest} +BuildRequires: %{saltbundlepy_module setuptools-scm >= 6.4.0} +BuildRequires: git +# /SECTION +%endif +%python_subpackages + +%description +This provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions. + +%prep +%autosetup -p1 -n hatch_vcs-%{version} + +%build +%pyproject_wheel + +%install +%if %{without test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +%pytest tests +%endif + +%if %{without test} +%files %{python_files} +%license LICENSE.txt +%doc README.md +%{python_sitelib}/hatch_vcs +%{python_sitelib}/hatch_vcs-%{version}*-info +%endif + +%changelog diff --git a/setuptools7x-tests.patch b/setuptools7x-tests.patch new file mode 100644 index 0000000..07508c8 --- /dev/null +++ b/setuptools7x-tests.patch @@ -0,0 +1,29 @@ +From 47364faf5563df0eaa631ed10383817762c6b547 Mon Sep 17 00:00:00 2001 +From: Ben Beasley +Date: Thu, 5 Jan 2023 18:49:54 -0500 +Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25) (#26) + +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')