python-setuptools_scm/python-setuptools_scm.spec

75 lines
1.7 KiB
RPMSpec
Raw Normal View History

%bcond tests 1
2017-08-15 16:29:32 +00:00
Name: python-setuptools_scm
2023-09-26 10:15:13 +00:00
Version: 8.0.3
Release: %autorelease
Summary: Blessed package to manage your versions by SCM tags
2015-10-21 15:13:26 +00:00
2023-05-24 08:35:36 +00:00
# SPDX
2015-10-21 15:13:26 +00:00
License: MIT
URL: https://github.com/pypa/setuptools_scm/
2023-09-26 12:41:36 +00:00
Source: %{pypi_source setuptools-scm}
2015-10-21 15:13:26 +00:00
BuildArch: noarch
2017-08-15 16:29:32 +00:00
BuildRequires: python%{python3_pkgversion}-devel
2017-08-15 16:29:32 +00:00
%if %{with tests}
2015-10-21 15:13:26 +00:00
BuildRequires: git-core
# Don't pull mercurial into RHEL just to test this work with it
%if %{undefined rhel}
2015-10-21 15:13:26 +00:00
BuildRequires: mercurial
2017-08-15 16:29:32 +00:00
%endif
2023-05-24 08:35:06 +00:00
# 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
2015-10-21 15:13:26 +00:00
%description
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.
2015-10-21 15:13:26 +00:00
%package -n python%{python3_pkgversion}-setuptools_scm
Summary: %{summary}
2015-10-21 15:13:26 +00:00
%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.
2015-10-21 15:13:26 +00:00
%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm toml
2020-07-10 15:14:23 +00:00
2015-10-21 15:13:26 +00:00
%prep
2023-09-21 09:48:29 +00:00
%autosetup -p1 -n setuptools-scm-%{version}
%generate_buildrequires
2023-05-24 08:35:06 +00:00
%pyproject_buildrequires
2015-10-21 15:13:26 +00:00
%build
%pyproject_wheel
2015-10-21 15:13:26 +00:00
%install
%pyproject_install
%pyproject_save_files setuptools_scm
2015-10-21 15:13:26 +00:00
2017-08-15 16:29:32 +00:00
%if %{with tests}
2015-10-21 15:13:26 +00:00
%check
# Skipped test tries to download from the internet
%pytest -v -k 'not test_pip_download'
2019-11-16 22:37:35 +00:00
%endif
2015-10-21 15:13:26 +00:00
%files -n python%{python3_pkgversion}-setuptools_scm -f %{pyproject_files}
2023-09-21 09:48:29 +00:00
%doc README.md
2017-04-10 15:35:04 +00:00
2015-10-21 15:13:26 +00:00
%changelog
%autochangelog