File python-versioningit.spec of Package python-versioningit
#
# spec file for package python-versioningit
#
# Copyright (c) 2025 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/
#
%define skip_python311 1
%define skip_python312 1
%define base_name versioningit
Name: python-versioningit
Version: 3.3.0
Release: 0
Summary: Versioning It with your Version In Git
License: MIT
URL: https://github.com/jwodder/versioningit
Source0: https://files.pythonhosted.org/packages/source/v/versioningit/versioningit-%{version}.tar.gz
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module tomli}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-packaging
Suggests: python-importlib-metadata
Suggests: python-dataclasses
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Versioning It with your Version In Git
%prep
%setup -q -n versioningit-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/versioningit
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative versioningit
%postun
%python_uninstall_alternative versioningit
%files %{python_files}
%doc CHANGELOG.md README.rst
%license LICENSE
%python_alternative %{_bindir}/versioningit
%{python_sitelib}/%{base_name}*
%changelog