From 9b993d0814bb1210c37d7006f3daa40e4d4351d9 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 19:36:21 +0000 Subject: [PATCH] import UBI python-setuptools_scm-8.0.4-7.el10 --- .gitignore | 3 +- python-setuptools_scm.spec | 313 ++++++++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 243 insertions(+), 75 deletions(-) diff --git a/.gitignore b/.gitignore index fa4d952..d37e1f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/setuptools_scm-1.15.7.tar.gz -/setuptools_scm-1.15.7.tar.gz +setuptools-scm-8.0.4.tar.gz diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index d7a096b..3da8933 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -1,108 +1,275 @@ -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 7; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec -# Tests are not included in PyPI tarball -%bcond_with tests +%bcond tests 1 -%global srcname setuptools_scm +Name: python-setuptools_scm +Version: 8.0.4 +Release: %autorelease +Summary: Blessed package to manage your versions by SCM tags -Name: python-%{srcname} -Version: 1.15.7 -Release: 4%{?dist} -Summary: Blessed package to manage your versions by scm tags - -# https://github.com/pypa/setuptools_scm/issues/211 +# SPDX License: MIT -URL: https://pypi.python.org/pypi/setuptools_scm -Source0: https://files.pythonhosted.org/packages/source/%(n=%{srcname}; echo ${n:0:1})/%{srcname}/%{srcname}-%{version}.tar.gz +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: python%{python3_pkgversion}dist(pytest) +BuildRequires: python%{python3_pkgversion}dist(setuptools) >= 45 +BuildRequires: python%{python3_pkgversion}dist(wheel) +# build is used only for one test, we don't need it in RHEL just for that +%if %{undefined rhel} +BuildRequires: python%{python3_pkgversion}dist(build) +%endif +# rich omitted, pulled in only with the [rich] extra +%endif %description -Setuptools_scm handles managing your python package versions in scm metadata. -It also handles file finders for the suppertes scms. +Setuptools_scm handles managing your Python package versions in SCM metadata. +It also handles file finders for the supported SCMs. -%if %{with python2} -%package -n python2-%{srcname} + +%package -n python%{python3_pkgversion}-setuptools_scm Summary: %{summary} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%if %{with tests} -BuildRequires: python2-pytest -%endif -%{?python_provide:%python_provide python2-%{srcname}} -%description -n python2-%{srcname} -Setuptools_scm handles managing your python package versions in scm metadata. -It also handles file finders for the suppertes scms. -%endif # with python2 +%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. -%package -n python3-%{srcname} -Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%if %{with tests} -BuildRequires: python3-pytest -%endif -%{?python_provide:%python_provide python3-%{srcname}} -Obsoletes: platform-python-%{srcname} < %{version}-%{release} -%description -n python3-%{srcname} -Setuptools_scm handles managing your python package versions in scm metadata. -It also handles file finders for the suppertes scms. +# We don't package the [rich] extra on RHELs, to avoid pulling rich into the buildroot +%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm toml%{!?rhel:,rich} + %prep -%autosetup -n %{srcname}-%{version} +%autosetup -p1 -n setuptools-scm-%{version} +%if %{defined rhel} +# Don't blow up all of the tests by failing to report the installed version of build +sed -i '0,/VERSION_PKGS/{s/, "build"//}' testing/conftest.py +%endif + + +%generate_buildrequires +%pyproject_buildrequires %{?with_tests:%{!?rhel:-x rich}} + %build -%if %{with python2} -%py2_build -%endif # with python2 -%py3_build +%pyproject_wheel + %install -%if %{with python2} -%py2_install -%endif # with python2 -%py3_install +%pyproject_install +%pyproject_save_files setuptools_scm + %if %{with tests} %check -%if %{with python2} -PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv -%endif # with python2 -PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv +# test_pip_download tries to download from the internet +# test_pyproject_missing_setup_hook_works requires build +%pytest -v -k 'not test_pip_download%{?rhel: and not test_pyproject_missing_setup_hook_works}' %endif -%if %{with python2} -%files -n python2-%{srcname} -#license LICENSE -%doc README.rst -%{python2_sitelib}/%{srcname}/ -%{python2_sitelib}/%{srcname}-*.egg-info/ -%endif # with python2 -%files -n python3-%{srcname} -#license LICENSE -%doc README.rst -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-*.egg-info +%files -n python%{python3_pkgversion}-setuptools_scm -f %{pyproject_files} +%doc README.md + %changelog -* Tue Jul 17 2018 Charalampos Stratakis - 1.15.7-4 -- Conditionalize the python2 subpackage +## START: Generated by rpmautospec +* Tue Oct 29 2024 Troy Dawson - 8.0.4-7 +- Bump release for October 2024 mass rebuild: -* Mon Jun 25 2018 Petr Viktorin - 1.15.7-3 -- Allow Python 2 for build +* Tue Sep 10 2024 Tomáš Hrnčiar - 8.0.4-6 +- Add gating configuration + +* Tue Sep 10 2024 Tomáš Hrnčiar - 8.0.4-5 +- Add simple smoke test + +* Mon Jun 24 2024 Troy Dawson - 8.0.4-4 +- Bump release for June 2024 mass rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 8.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 8.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Oct 02 2023 Miro Hrončok - 8.0.4-1 +- Update to 8.0.4 +- Fixes: rhbz#2241772 + +* Tue Sep 26 2023 Miro Hrončok - 8.0.3-10 +- Avoid needlesly BuildRequiring python3-rich when not running tests and on + RHEL + +* Tue Sep 26 2023 Lumír Balhar - 8.0.3-1 +- Update to 8.0.3 (rhbz#2239825) + +* Thu Sep 21 2023 Lumír Balhar - 8.0.2-1 +- Update to 8.0.2 (rhbz#2239825) + +* Fri Jul 21 2023 Fedora Release Engineering - 7.1.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 29 2023 Python Maint - 7.1.0-6 +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint - 7.1.0-5 +- Bootstrap for Python 3.12 + +* Tue May 30 2023 Yaakov Selkowitz - 7.1.0-4 +- Drop unused python-virtualenv test dependency + +* Wed May 24 2023 Miro Hrončok - 7.1.0-3 +- Drop the build dependency on tox +- Verify the license tag is SPDX + +* Fri Jan 20 2023 Fedora Release Engineering - 7.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Dec 17 2022 Miro Hrončok - 7.1.0-1 +- Update to 7.1.0 +Resolves: rhbz#2154548 + +* Sat Aug 06 2022 Charalampos Stratakis - 7.0.5-1 +- Update to 7.0.5 +Resolves: rhbz#2106018 + +* Fri Jul 22 2022 Fedora Release Engineering - 7.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jul 01 2022 Charalampos Stratakis - 7.0.4-1 +- Update to 7.0.4 +Resolves: rhbz#2103092 + +* Wed Jun 29 2022 Lumír Balhar - 7.0.3-1 +- Update to 7.0.3 +Resolves: rhbz#2099730 + +* Tue Jun 14 2022 Python Maint - 6.4.2-3 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 6.4.2-2 +- Bootstrap for Python 3.11 + +* Thu Feb 17 2022 Elliott Sales de Andrade - 6.4.2-1 +- Update to latest version (#2041601) + +* Fri Jan 21 2022 Fedora Release Engineering - 6.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Sep 20 2021 Lumír Balhar - 6.3.2-1 +- Update to 6.3.2 +Resolves: rhbz#2001028 + +* Fri Jul 23 2021 Fedora Release Engineering - 6.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 6.0.1-3 +- Rebuilt for Python 3.10 + +* Wed Jun 02 2021 Python Maint - 6.0.1-2 +- Bootstrap for Python 3.10 + +* Mon Mar 22 2021 Charalampos Stratakis - 6.0.1-1 +- Update to 6.0.1 +- Fixes: rhbz#1939828 + +* Fri Jan 29 2021 Miro Hrončok - 5.0.1-1 +- Update to 5.0.1 +- Fixes: rhbz#1907070 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Dec 2 2020 Miro Hrončok - 4.1.2-4 +- BuildRequire six explicitly, for tests + +* Wed Jul 29 2020 Fedora Release Engineering - 4.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Miro Hrončok - 4.1.2-2 +- Add setuptools_scm[toml] subpackage + +* Mon Jun 01 2020 Charalampos Stratakis - 4.1.2-1 +- Update to 4.1.2 (#1839497) + +* Sat May 23 2020 Miro Hrončok - 3.5.0-3 +- Rebuilt for Python 3.9 + +* Fri May 22 2020 Miro Hrončok - 3.5.0-2 +- Bootstrap for Python 3.9 + +* Tue Apr 14 2020 Miro Hrončok - 3.5.0-1 +- Update to 3.5.0 (#1792534) + +* Thu Jan 30 2020 Fedora Release Engineering - 3.3.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Nov 16 2019 Orion Poplawski - 3.3.3-6 +- Drop python2 for Fedora 32+/EPEL8+ + +* Thu Oct 03 2019 Miro Hrončok - 3.3.3-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Thu Aug 15 2019 Miro Hrončok - 3.3.3-4 +- Rebuilt for Python 3.8 + +* Wed Aug 14 2019 Miro Hrončok - 3.3.3-3 +- Bootstrap for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun May 12 2019 Orion Poplawski - 3.3.3-1 +- Update to 3.3.3 + +* Sat May 11 2019 Orion Poplawski - 3.3.1-1 +- Update to 3.3.1 + +* Tue May 7 2019 Orion Poplawski - 3.3.0-1 +- Update to 3.3.0 + +* Sat Feb 2 2019 Igor Gnatenko - 3.2.0-1 +- Update to 3.2.0 + +* Sat Feb 02 2019 Fedora Release Engineering - 3.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Aug 10 2018 Igor Gnatenko - 3.1.0-1 +- Update to 3.1.0 + +* Sun Jul 29 2018 Orion Poplawski - 3.0.4-1 +- Update to 3.0.4 +- Re-enable tests + +* Sat Jul 14 2018 Fedora Release Engineering - 2.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sat Jun 16 2018 Miro Hrončok - 2.1.0-3 +- Rebuilt for Python 3.7 + +* Wed Jun 13 2018 Miro Hrončok - 2.1.0-2 +- Bootstrap for Python 3.7 + +* Mon May 14 2018 Charalampos Stratakis - 2.1.0-1 +- Update to 2.1.0 * Fri Feb 09 2018 Fedora Release Engineering - 1.15.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -176,3 +343,5 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv * Mon Sep 14 2015 Orion Poplawski - 1.7.0-1 - Initial package + +## END: Generated by rpmautospec diff --git a/sources b/sources index 16d64f5..98767d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (setuptools_scm-1.15.7.tar.gz) = 0aa6056c03fe100cdaa7b11c9d2073431bb5c3904a80a994a8263c0ccac81f7a2c0b6c7e6dfd09ad605c5ff0e86981b894b42920cb69d1ef1d43ea08b2ddd4a0 +SHA512 (setuptools-scm-8.0.4.tar.gz) = 1b584f20dfad115f379a97de9e96bb3b36ab00986381748c2f395facd26ce01a6556ccfbabeb8f0cf9ce8720b26ce3a00040dba02cc689701ccf1d31f13277da