File python-setuptools_scm.spec of Package python-setuptools_scm

%{?vortex_header}%{!?vortex_header:%global vortex_pkg vortex-2025-12}

%bcond tests 0

Name:           %{vortex_pkg}-python-setuptools_scm
Version:        9.2.2
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:  %{vortex_pkg}-python3-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
%endif

# FIXME
BuildRequires: pyproject-rpm-macros
BuildRequires:  %{vortex_pkg}-python3-pip
BuildRequires:  %{vortex_pkg}-python3-setuptools

%description
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


%package -n %{vortex_pkg}-python3-setuptools_scm
Summary:        %{summary}

%description -n %{vortex_pkg}-python3-setuptools_scm
Setuptools_scm handles managing your Python package versions in SCM metadata.
It also handles file finders for the supported SCMs.


# We don't package the [rich] extra on RHELs, to avoid pulling rich into the buildroot
%pyproject_extras_subpkg -n %{vortex_pkg}-python3-setuptools_scm toml%{!?rhel:,rich}


%prep
%autosetup -p1 -n setuptools_scm-%{version}
# Remove flake8, mypy, ruff, … from the test dependencies
sed -Ei '/^test = \[/,/^\]/ { /"(griffe|mypy|ruff|flake8).*"/d }' pyproject.toml

%if %{defined rhel}
# Remove unnecessary test dependencies:
# rich is listed in both [rich] and [test] extras, so we need to be more careful
sed -Ei '/^test = \[/,/^\]/ { /"(rich|build|wheel)",/d }' pyproject.toml
# Don't blow up all of the tests by failing to report the installed version of build
sed -Ei '0,/VERSION_PKGS/{s/, "(build|wheel)"//g}' testing/conftest.py
%endif


%generate_buildrequires
# Note: We only pull in the [rich] extra when running tests.
# This is to make the new Python version bootstrapping simpler
# as setuptools_scm is an early package and rich is a late one.
%pyproject_buildrequires %{?with_tests:-g test %{!?rhel:-x rich}}


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files setuptools_scm


%if %{with tests}
%check
# test_pip_download, test_xmlsec_download_regression try to download from the internet
# test_pyproject_missing_setup_hook_works requires build
%pytest -v -k 'not test_pip_download and not test_xmlsec_download_regression %{?rhel: and not test_pyproject_missing_setup_hook_works}'
%endif


%files -n %{vortex_pkg}-python3-setuptools_scm -f %{pyproject_files}
%doc README.md
%{_bindir}/setuptools-scm


%changelog
## START: Generated by rpmautospec
* Thu Nov 20 2025 Lumir Balhar <lbalhar@redhat.com> - 9.2.2-1
- Update to 9.2.2 (rhbz#2386531)

* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 8.3.1-8
- Rebuilt for Python 3.14.0rc3 bytecode

* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 8.3.1-7
- Rebuilt for Python 3.14.0rc2 bytecode

* Wed Jul 23 2025 Miro Hrončok <miro@hroncok.cz> - 8.3.1-5
- ELN: Remove unused test dependency on wheel

* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 8.3.1-4
- Rebuilt for Python 3.14

* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 8.3.1-3
- Bootstrap for Python 3.14

* Tue May 06 2025 Miro Hrončok <miro@hroncok.cz> - 8.3.1-1
- Update to 8.3.1
- Fixes: rhbz#2361626

* Wed Mar 19 2025 Miro Hrončok <miro@hroncok.cz> - 8.2.1-1
- Update to 8.2.1
- Fixes: rhbz#2353334

* Tue Mar 18 2025 Miro Hrončok <miro@hroncok.cz> - 8.2.0-1
- Update to 8.2.0
- Fixes: rhbz#2347066

* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 8.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Tue Sep 17 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 8.1.0-1
- Update to 8.1.0
- Fixes: rhbz#2279334

* Mon Aug 19 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 8.0.4-7
- Add a simple smoke test

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 8.0.4-5
- Rebuilt for Python 3.13

* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 8.0.4-4
- Bootstrap for Python 3.13

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Oct 02 2023 Miro Hrončok <miro@hroncok.cz> - 8.0.4-1
- Update to 8.0.4
- Fixes: rhbz#2241772

* Tue Sep 26 2023 Miro Hrončok <miro@hroncok.cz> - 8.0.3-10
- Avoid needlesly BuildRequiring python3-rich when not running tests and on
  RHEL

* Tue Sep 26 2023 Lumír Balhar <lbalhar@redhat.com> - 8.0.3-1
- Update to 8.0.3 (rhbz#2239825)

* Thu Sep 21 2023 Lumír Balhar <lbalhar@redhat.com> - 8.0.2-1
- Update to 8.0.2 (rhbz#2239825)

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 7.1.0-6
- Rebuilt for Python 3.12

* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 7.1.0-5
- Bootstrap for Python 3.12

* Tue May 30 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 7.1.0-4
- Drop unused python-virtualenv test dependency

* Wed May 24 2023 Miro Hrončok <mhroncok@redhat.com> - 7.1.0-3
- Drop the build dependency on tox
- Verify the license tag is SPDX

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sat Dec 17 2022 Miro Hrončok <mhroncok@redhat.com> - 7.1.0-1
- Update to 7.1.0
Resolves: rhbz#2154548

* Sat Aug 06 2022 Charalampos Stratakis <cstratak@redhat.com> - 7.0.5-1
- Update to 7.0.5
Resolves: rhbz#2106018

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Fri Jul 01 2022 Charalampos Stratakis <cstratak@redhat.com> - 7.0.4-1
- Update to 7.0.4
Resolves: rhbz#2103092

* Wed Jun 29 2022 Lumír Balhar <lbalhar@redhat.com> - 7.0.3-1
- Update to 7.0.3
Resolves: rhbz#2099730

* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 6.4.2-3
- Rebuilt for Python 3.11

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.4.2-2
- Bootstrap for Python 3.11

* Thu Feb 17 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 6.4.2-1
- Update to latest version (#2041601)

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Mon Sep 20 2021 Lumír Balhar <lbalhar@redhat.com> - 6.3.2-1
- Update to 6.3.2
Resolves: rhbz#2001028

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 6.0.1-3
- Rebuilt for Python 3.10

* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 6.0.1-2
- Bootstrap for Python 3.10

* Mon Mar 22 2021 Charalampos Stratakis <cstratak@redhat.com> - 6.0.1-1
- Update to 6.0.1
- Fixes: rhbz#1939828

* Fri Jan 29 2021 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-1
- Update to 5.0.1
- Fixes: rhbz#1907070

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Dec  2 2020 Miro Hrončok <mhroncok@redhat.com> - 4.1.2-4
- BuildRequire six explicitly, for tests

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 4.1.2-2
- Add setuptools_scm[toml] subpackage

* Mon Jun 01 2020 Charalampos Stratakis <cstratak@redhat.com> - 4.1.2-1
- Update to 4.1.2 (#1839497)

* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-3
- Rebuilt for Python 3.9

* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-2
- Bootstrap for Python 3.9

* Tue Apr 14 2020 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-1
- Update to 3.5.0 (#1792534)

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Sat Nov 16 2019 Orion Poplawski <orion@nwra.com> - 3.3.3-6
- Drop python2 for Fedora 32+/EPEL8+

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.3-5
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.3-4
- Rebuilt for Python 3.8

* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.3-3
- Bootstrap for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sun May 12 2019 Orion Poplawski <orion@nwra.com> - 3.3.3-1
- Update to 3.3.3

* Sat May 11 2019 Orion Poplawski <orion@nwra.com> - 3.3.1-1
- Update to 3.3.1

* Tue May  7 2019 Orion Poplawski <orion@nwra.com> - 3.3.0-1
- Update to 3.3.0

* Sat Feb 2 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.2.0-1
- Update to 3.2.0

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Aug 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.1.0-1
- Update to 3.1.0

* Sun Jul 29 2018 Orion Poplawski <orion@nwra.com> - 3.0.4-1
- Update to 3.0.4
- Re-enable tests

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-3
- Rebuilt for Python 3.7

* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-2
- Bootstrap for Python 3.7

* Mon May 14 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.1.0-1
- Update to 2.1.0

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Jan 20 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.15.7-1
- Update to 1.15.7

* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.15.6-7
- Use better Obsoletes for platform-python

* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.15.6-6
- Remove platform-python subpackage

* Thu Aug 24 2017 Miro Hrončok <mhroncok@redhat.com> - 1.15.6-5
- Rebuilt for rhbz#1484607

* Sun Aug 20 2017 Tomas Orsava <torsava@redhat.com> - 1.15.6-4
- Re-enable tests to finish bootstrapping the platform-python stack
  (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)

* Thu Aug 10 2017 Lumír Balhar <lbalhar@redhat.com> - 1.15.6-3
- Add subpackage for platform-python
- Disable tests so platform-python stack can be bootstrapped
  (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Thu Jun 15 2017 Orion Poplawski <orion@cora.nwra.com> - 1.15.6-1
- Update to 1.15.6

* Mon Apr 10 2017 Orion Poplawski <orion@cora.nwra.com> - 1.15.5-1
- Update to 1.15.5

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sat Feb 04 2017 Kevin Fenzi <kevin@scrye.com> - 1.15.0-1
- Update to 1.15.0

* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 1.13.0-2
- Rebuild for Python 3.6

* Mon Oct 10 2016 Parag Nemade <pnemade AT redhat DOT com> - 1.13.0-1
- Update to 1.13.0

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.1-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jan 4 2016 Orion Poplawski <orion@cora.nwra.com> - 1.10.1-2
- No python2 package on EPEL (setuptools too old)

* Thu Dec 17 2015 Orion Poplawski <orion@cora.nwra.com> - 1.10.1-1
- Update to 1.10.1

* Wed Dec 2 2015 Orion Poplawski <orion@cora.nwra.com> - 1.9.0-1
- Update to 1.9.0

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Mon Oct 19 2015 Orion Poplawski <orion@cora.nwra.com> - 1.8.0-2
- Cleanup stray .pyc files from tests

* Sat Sep 19 2015 Orion Poplawski <orion@cora.nwra.com> - 1.8.0-1
- Update to 1.8.0
- Fix license tag

* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 1.7.0-1
- Initial package

## END: Generated by rpmautospec
openSUSE Build Service is sponsored by