python-setuptools_scm/python-setuptools_scm.spec
Miro Hrončok 29ac9271ec Convert to %autorelease and %autochangelog
[skip changelog]
2023-09-26 15:19:03 +02:00

75 lines
1.7 KiB
RPMSpec

%bcond tests 1
Name: python-setuptools_scm
Version: 8.0.3
Release: %autorelease
Summary: Blessed package to manage your versions by SCM tags
# SPDX
License: MIT
URL: https://github.com/pypa/setuptools_scm/
Source: %{pypi_source setuptools-scm}
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
%if %{with tests}
BuildRequires: git-core
# Don't pull mercurial into RHEL just to test this work with it
%if %{undefined rhel}
BuildRequires: mercurial
%endif
# Manually listed test dependencies from tox.ini, to avoid pulling tox into RHEL
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(setuptools) >= 45
# virtualenv omitted, see https://github.com/pypa/setuptools_scm/pull/940
# rich omitted, pulled in as build-backend dependency
%endif
%description
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.
%package -n python%{python3_pkgversion}-setuptools_scm
Summary: %{summary}
%description -n python%{python3_pkgversion}-setuptools_scm
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.
%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm toml
%prep
%autosetup -p1 -n setuptools-scm-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files setuptools_scm
%if %{with tests}
%check
# Skipped test tries to download from the internet
%pytest -v -k 'not test_pip_download'
%endif
%files -n python%{python3_pkgversion}-setuptools_scm -f %{pyproject_files}
%doc README.md
%changelog
%autochangelog