11Vendor: Microsoft Corporation
22Distribution: Azure Linux
3- # Macros for py2/py3 compatibility
4- %global pyver %{python3_pkgversion }
5- %global pyver_bin python%{pyver }
6- %global pyver_sitelib %{expand:%{python%{pyver }_sitelib}}
7- %global pyver_install %{expand:%{py%{pyver }_install}}
8- %global pyver_build %{expand:%{py%{pyver }_build}}
9- # End of macros for py2/py3 compatibility
3+
4+ %{! ?sources_gpg: %{! ?dlrn:%global sources_gpg 1} }
5+ %global sources_gpg_sign 0x2ef3fe0ec2b075ab7458b5f8b702b20b13df2318
106
117%{! ?upstream_version: %global upstream_version %{version }%{?milestone }}
8+ # we are excluding some BRs from automatic generator
9+ %global excluded_brs doc8 bandit pre-commit hacking flake8-import-order
1210
1311%global pypi_name debtcollector
1412%global with_doc 1
@@ -21,78 +19,109 @@ It is a collection of functions/decorators which is used to signal a user when \
2119* further customizing the emitted messages
2220
2321Name: python-%{pypi_name }
24- Version: 1.22 .0
25- Release: 4 %{?dist }
22+ Version: 3.0 .0
23+ Release: 10 %{?dist }
2624Summary: A collection of Python deprecation patterns and strategies
2725
28- License: ASL 2.0
26+ License: Apache- 2.0
2927URL: https://pypi.python.org/pypi/%{pypi_name }
30- Source0: https://tarballs.openstack.org/%{pypi_name }/%{pypi_name }-%{upstream_version }.tar.gz#/python-%{pypi_name}-%{upstream_version}.tar.gz
28+ Source0: https://tarballs.openstack.org/%{pypi_name }/%{pypi_name }-%{upstream_version }.tar.gz
29+ # Required for tarball sources verification
30+ %if 0%{?sources_gpg } == 1
31+ Source101: https://tarballs.openstack.org/%{pypi_name }/%{pypi_name }-%{upstream_version }.tar.gz.asc
32+ Source102: https://releases.openstack.org/_static/%{sources_gpg_sign }.txt
33+ %endif
34+
35+ BuildRequires: python-pip
36+ BuildRequires: python-pbr
37+ BuildRequires: python-wheel
38+ BuildRequires: python-setuptools
39+ BuildRequires: python3-pytest
40+ BuildRequires: python-dulwich
41+ BuildRequires: python-openstackdocstheme
42+ BuildRequires: python-toml
43+ BuildRequires: python-tox
44+ BuildRequires: python-wrapt
45+ BuildRequires: python-extras
46+ BuildRequires: python-sphinx
47+ BuildRequires: python-tox-current-env
48+ BuildRequires: python-virtualenv
49+ BuildRequires: python3-testtools
50+ BuildRequires: python3-fixtures
3151
3252BuildArch: noarch
3353
34- BuildRequires: git
54+ # Required for tarball sources verification
55+ %if 0%{?sources_gpg } == 1
56+ BuildRequires: /usr/bin/gpgv2
57+ %endif
58+
59+ BuildRequires: git-core
3560
3661%description
3762%{common_desc }
3863
39- %package -n python%{ pyver } -%{pypi_name }
64+ %package -n python3 -%{pypi_name }
4065Summary: A collection of Python deprecation patterns and strategies
41- %{?python_provide:%python_provide python%{pyver }-%{pypi_name }}
4266
43- BuildRequires: python%{pyver }-devel
44- BuildRequires: python%{pyver }-setuptools
45- BuildRequires: python%{pyver }-pbr
67+ BuildRequires: python3-devel
68+ BuildRequires: pyproject-rpm-macros
4669
47- Requires: python%{pyver }-funcsigs
48- Requires: python%{pyver }-pbr
49- Requires: python%{pyver }-six
50- Requires: python%{pyver }-wrapt
51-
52- %description -n python%{pyver }-%{pypi_name }
70+ %description -n python3-%{pypi_name }
5371%{common_desc }
5472
5573
5674%if 0%{?with_doc }
5775%package -n python-%{pypi_name }-doc
5876Summary: Documentation for the debtcollector module
5977
60- BuildRequires: python%{pyver }-sphinx
61- BuildRequires: python%{pyver }-openstackdocstheme
62- BuildRequires: python%{pyver }-fixtures
63- BuildRequires: python%{pyver }-six
64- BuildRequires: python%{pyver }-wrapt
65-
6678%description -n python-%{pypi_name }-doc
6779Documentation for the debtcollector module
6880%endif
6981
70-
7182%prep
83+ # Required for tarball sources verification
84+ %if 0%{?sources_gpg } == 1
85+ %{gpgverify } --keyring=%{SOURCE102 } --signature=%{SOURCE101 } --data=%{SOURCE0 }
86+ %endif
7287%autosetup -n %{pypi_name }-%{upstream_version } -S git
7388
74- # let RPM handle deps
75- rm -rf *requirements.txt
89+
90+ sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
91+ sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps = /" tox.ini
92+ sed -i /^minversion.*/d tox.ini
93+ sed -i /^requires.*virtualenv.*/d tox.ini
94+
95+ # Exclude some bad-known BRs
96+ for pkg in %{excluded_brs };do
97+ for reqfile in doc/requirements.txt test-requirements.txt; do
98+ if [ -f $reqfile ]; then
99+ sed -i /^${pkg}.*/d $reqfile
100+ fi
101+ done
102+ done
76103
77104%build
78- %{pyver_build }
105+ %pyproject_wheel
106+
107+ %install
108+ %pyproject_install
79109
80110%if 0%{?with_doc }
81111# doc
82- %{pyver_bin } setup.py build_sphinx -b html
112+ PYTHONPATH= "%{buildroot }/%{python3_sitelib }"
113+ %tox -e docs
83114# Fix hidden-file-or-dir warnings
84- rm -fr doc/build/html/.buildinfo
115+ rm -fr doc/build/html/.{doctrees,buildinfo}
116+ rm -f doc/build/html/_static/images/docs/license.png
85117%endif
86118
87- %install
88- %{pyver_install }
89-
90- %files -n python%{pyver }-%{pypi_name }
119+ %files -n python3-%{pypi_name }
91120%doc README.rst CONTRIBUTING.rst
92121%license LICENSE
93- %{pyver_sitelib }/%{pypi_name }
94- %{pyver_sitelib }/%{pypi_name }* .egg -info
95- %exclude %{pyver_sitelib }/%{pypi_name }/tests
122+ %{python3_sitelib }/%{pypi_name }
123+ %{python3_sitelib }/%{pypi_name }* .dist -info
124+ %exclude %{python3_sitelib }/%{pypi_name }/tests
96125
97126%if 0%{?with_doc }
98127%files -n python-%{pypi_name }-doc
@@ -101,6 +130,10 @@ rm -fr doc/build/html/.buildinfo
101130%endif
102131
103132%changelog
133+ * Fri Jan 09 2026 Durga Jagadeesh Palli <v-dpalli@microsoft.com> - 3.0.0-10
134+ - Upgrade to 3.0.0 (Reference: Fedora 44)
135+ - License verified
136+
104137* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.22.0-4
105138- Initial CBL-Mariner import from Fedora 32 (license: MIT).
106139
@@ -121,4 +154,3 @@ rm -fr doc/build/html/.buildinfo
121154
122155* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 1.21.0-1
123156- Update to 1.21.0
124-
0 commit comments