# # spec file # # 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/ # %global flavor %{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif %{?sle15_python_module_pythons} Name: python-hatch_vcs%{psuffix} Version: 0.4.0 Release: 1.9 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 BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 # https://github.com/ofek/hatch-vcs/issues/8 Requires: (python-setuptools_scm >= 6.4.0) Requires: python-hatchling >= 0.21.0 Provides: python-hatch-vcs = %{version}-%{release} BuildArch: noarch # SECTION build BuildRequires: %{python_module hatchling >= 0.21.0} BuildRequires: %{python_module pip} # /SECTION %if %{with test} # SECTION test BuildRequires: %{python_module hatch_vcs = %{version}} BuildRequires: %{python_module pytest} BuildRequires: %{python_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 * Mon Nov 6 2023 Johannes Kastl - update to 0.4.0: * Changed: - Drop support for Python 3.7 * Added: - Officially support Python 3.12 * Fixed: - Prevent UserWarning when a template is not defined explicitly - drop patch setuptools7x-tests.patch that is included upstream * Wed May 17 2023 Dirk Müller - add setuptools7x-tests.patch to fix tests with newer setuptools * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Mon Feb 27 2023 Matej Cepl - The test build branch MUST BR the package itself. * Tue Feb 21 2023 Matej Cepl - Switch to _multibuild to avoid a build cycle with pytest. * Sat Dec 10 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 2022 Johannes Kastl - update to 0.2.1: * Fixed: - Allow root in raw-options - drop patch fix-tests-setuptools-scm7.patch * Fri Nov 11 2022 Daniel Garcia - Add fix-tests-setuptools-scm7.patch upstream patch to support setuptools_scm 7 gh#ofek/hatch-vcs#9 * Wed Jul 20 2022 Ben Greiner - Cleanup spec file even more - Fix requirements: prevent setuptools_scm 7 update - Provide the canonical PyPI name * Tue Jul 19 2022 Matej Cepl - Cleanup the SPEC file. * Tue Jul 19 2022 Johannes Kastl - new package python-hatch_vcs