%global _empty_manifest_terminate_build 0
Name:           python-setuptools_scm
Version:        10.0.5
Release:        1
Summary:        Manage your Python package versions in SCM metadata
License:        MIT
URL:            https://pypi.python.org/pypi/setuptools_scm/
Source0:        %{pypi_source setuptools_scm}

BuildRequires:  python3-tomli python3-packaging python3-pip python3-wheel python3-vcs-versioning
BuildArch:      noarch
Requires:       python3-setuptool
Requires:       python3-toml
Requires:       python3-rich

%python_extras_subpkg -n python3-setuptools_scm -i %{python3_sitelib}/setuptools_scm-*.dist-info toml,rich

%description
setuptools_scm handles managing your Python package versions in SCM metadata
instead of declaring them as the version argument or in a SCM managed file.
It also handles file finders for the supported SCMs.

%package -n python3-setuptools_scm
Summary:        the blessed package to manage your versions by scm tags
Provides:       python-setuptools_scm
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%description -n python3-setuptools_scm
setuptools_scm handles managing your Python package versions in SCM metadata
instead of declaring them as the version argument or in a SCM managed file.
It also handles file finders for the supported SCMs.

%package help
Summary:        Development documents and examples for setuptools_scm
Provides:       python3-setuptools_scm-doc
%description help
setuptools_scm handles managing your Python package versions in SCM metadata
instead of declaring them as the version argument or in a SCM managed file.
It also handles file finders for the supported SCMs.


%prep
%autosetup -n setuptools_scm-%{version}

%build
%pyproject_build

%install
%pyproject_install setuptools_scm==%{version}
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi

%files -n python3-setuptools_scm
%{python3_sitelib}/*
%{_bindir}/setuptools-scm

%files help
%{_pkgdocdir}

%changelog
* Wed Jun 17 2026 lilu <lilu@kylinos.cn> - 10.0.5-1
- update version to 10.0.5
  * Allow 'dump_version()' deprecation warning to be silenced by passing 'scm_version=None'
  * Remove 'tool.uv.sources' from 'setuptools-scm/pyproject.toml' to fix sdist builds outside the workspace 

* Mon Jan 05 2026 maqi <maqi@uniontech.com> - 9.2.2-1
- Upgrade to 9.2.2
- Fix 1231 don't warn about tool.setuptools.dynamic.version when only using file finder. The warning about combining version guessing with setuptools dynamic versions should only be issued when setuptools-scm is performing version inference, not when it's only being used for its file finder functionality

* Wed Oct 15 2025 maqi <maqi@uniontech.com> - 9.2.1-1
- Upgrade to 9.2.1
  Fix 1216 explicitly deprecate setuptools dynamic version when active

* Mon Sep 29 2025 Yu Peng <yupeng@kylinos.cn> - 9.2.0-1
- Upgrade to 9.2.0 
  * reiterate version inference
  * simple activation now requires a extra instead of setting up many pre-existing projects for failure/error

* Thu Jul 17 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 8.3.1-2
- Fix extra package toml and rich missing

* Thu May 29 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 8.3.1-1
- Update package to version 8.3.1

* Tue Oct 29 2024 Ge Wang <wang__ge@126.com> - 8.1.0-1
- Update to 8.1.0

* Fri Sep 01 2023 wulei <wu_lei@hoperun.com> - 7.1.0-1
- Update to 7.1.0

* Sun Apr 23 2023 caodongxia <caodongxia@h-partners.com> - 6.4.2-1
- Update to 6.4.2

* Thu Jun 16 2022 OpenStack_SIG <openstack@openeuler.org> - 6.0.0-1
- Upgrade version for openstack yoga

* Thu Dec 3 2020 baizhonggui <baizhonggui@huawei.com> - 4.1.2-1
- Update to 4.1.2

* Wed Oct 21 2020 zhanghua <zhanghua40@huawei.com> - 3.1.0-3
- remove python2 subpackage

* Tue Dec 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1.0-2
- Modify spec format.

* Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.1.0-1
- Package init.