diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2025-08-29 08:04:57 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2025-08-29 08:04:57 +0000 |
commit | 97ba064d41110be8722c8401f20a0422bf1f9335 (patch) | |
tree | 95ce97f2c4c81da6ae11e937496e2bc791f0bd74 | |
parent | 410f0ab1d0a03e37bb02444b806d7117bd90bfe0 (diff) |
-rw-r--r-- | python-oslo-metrics.spec | 74 |
1 files changed, 46 insertions, 28 deletions
diff --git a/python-oslo-metrics.spec b/python-oslo-metrics.spec index b6288d7..abda0ed 100644 --- a/python-oslo-metrics.spec +++ b/python-oslo-metrics.spec @@ -1,8 +1,8 @@ ## START: Set by rpmautospec -## (rpmautospec version 0.7.3) +## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 5; + release_number = 9; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -11,6 +11,8 @@ %{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} } %global sources_gpg_sign 0x2ef3fe0ec2b075ab7458b5f8b702b20b13df2318 %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +# we are excluding some BRs from automatic generator +%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order %global with_doc 1 @@ -26,11 +28,9 @@ Version: 0.8.0 Release: %autorelease Summary: OpenStack Oslo Metrics library -# Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 URL: https://opendev.org/openstack/oslo.metrics Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz -# Required for tarball sources verification %if 0%{?sources_gpg} == 1 Source101: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc Source102: https://releases.openstack.org/_static/%{sources_gpg_sign}.txt @@ -44,23 +44,12 @@ BuildRequires: /usr/bin/gpgv2 %package -n python3-%{pkg_name} Summary: OpenStack Oslo Metrics library -%py_provides python3-%{pkg_name} BuildRequires: git-core BuildRequires: python3-devel -BuildRequires: python3-oslo-config -BuildRequires: python3-oslo-log -BuildRequires: python3-oslo-utils +BuildRequires: pyproject-rpm-macros BuildRequires: python3-pbr -BuildRequires: python3-prometheus_client -# Required for testing -BuildRequires: python3-oslotest - -Requires: python3-oslo-config >= 2:6.9.0 -Requires: python3-oslo-log >= 3.44.0 -Requires: python3-oslo-utils >= 3.41.0 -Requires: python3-prometheus_client >= 0.6.0 -Requires: python3-pbr >= 3.1.1 +BuildRequires: python3-tox-current-env %description -n python3-%{pkg_name} %{common_desc} @@ -70,10 +59,6 @@ Requires: python3-pbr >= 3.1.1 Summary: Documentation for the Oslo Metrics library Group: Documentation -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-sphinx -BuildRequires: python3-sphinxcontrib-apidoc - %description -n python-%{pkg_name}-doc Documentation for the Oslo Metrics library. %endif @@ -97,30 +82,51 @@ Tests for the Oslo Metrics library. %{gpgverify} --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0} %endif %autosetup -n %{pypi_name}-%{upstream_version} -S git -# Let RPM handle the dependencies -rm -rf {test-,}requirements.txt + +sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini +sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini +sed -i /^minversion.*/d tox.ini +sed -i /^requires.*virtualenv.*/d tox.ini +sed -i '/sphinx-build/ s/-W//' tox.ini + +# Exclude some bad-known BRs +for pkg in %{excluded_brs};do + for reqfile in doc/requirements.txt test-requirements.txt; do + if [ -f $reqfile ]; then + sed -i /^${pkg}.*/d $reqfile + fi + done +done + +# Automatic BR generation +%generate_buildrequires +%if 0%{?with_doc} + %pyproject_buildrequires -t -e %{default_toxenv},docs +%else + %pyproject_buildrequires -t -e %{default_toxenv} +%endif %build -%{py3_build} +%pyproject_wheel %if 0%{?with_doc} # generate html docs -sphinx-build-3 -b html doc/source doc/build/html +%tox -e docs # remove the sphinx-build-3 leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install -%{py3_install} +%pyproject_install %check -%python3 -m unittest discover -v -s oslo_metrics/tests +%tox -e %{default_toxenv} %files -n python3-%{pkg_name} %license LICENSE %doc README.rst %{python3_sitelib}/oslo_metrics -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/*.dist-info %{_bindir}/oslo-metrics %exclude %{python3_sitelib}/oslo_metrics/tests/ @@ -135,6 +141,18 @@ rm -rf doc/build/html/.{doctrees,buildinfo} %changelog ## START: Generated by rpmautospec +* Fri Aug 29 2025 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 0.8.0-9 +- Migrate old macros + +* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.8.0-8 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Jun 11 2025 Python Maint <python-maint@redhat.com> - 0.8.0-6 +- Rebuilt for Python 3.14 + * Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild |