1- %global pypi_name oslo.i18n
2- %global pkg_name oslo-i18n
3- %global with_doc 0
1+ %{! ?upstream_version: %global upstream_version %{version }%{?milestone }}
2+ %global pypi_name oslo_i18n
3+ %global pkg_name oslo_i18n
4+ %global with_doc 1
5+
46%global common_desc \
57The oslo.i18n library contain utilities for working with internationalization \
68(i18n) features, especially translation for text strings in an application \
79or library.
8- Summary: OpenStack i18n library
10+
911Name: python-oslo-i18n
10- Version: 5.1.0
11- Release: 4%{?dist }
12- License: ASL 2.0
12+ Version: 6.7.1
13+ Release: 2%{?dist }
14+ Summary: OpenStack i18n library
15+ License: Apache-2.0
1316Vendor: Microsoft Corporation
1417Distribution: Azure Linux
1518URL: https://github.com/openstack/%{pypi_name }
16- Source0: https://tarballs.openstack .org/%{pypi_name }/%{pypi_name }-%{version }.tar.gz#/%{name}-%{version}.tar.gz
17- BuildRequires: git-core
19+ Source0: https://files.pythonhosted .org/packages/source/o/ %{pypi_name }/%{pypi_name }-%{upstream_version }.tar.gz#/%{name}-%{version}.tar.gz
20+
1821BuildArch: noarch
1922
23+ BuildRequires: git-core
24+
2025%description
2126%{common_desc }
2227
2328%package -n python3-%{pkg_name }
24- %{?python_provide:%python_provide python3-%{pkg_name }}
2529Summary: OpenStack i18n Python 2 library
30+
2631BuildRequires: python3-devel
32+ BuildRequires: pyproject-rpm-macros
2733BuildRequires: python3-setuptools
2834BuildRequires: python3-pbr
2935BuildRequires: python3-babel
3036BuildRequires: python3-six
3137BuildRequires: python3-fixtures
32- # Required to compile translation files
38+ BuildRequires: python3-tox
39+ BuildRequires: python3-pluggy
40+ BuildRequires: python3-py
41+ BuildRequires: python3-toml
42+ BuildRequires: python3-openstackdocstheme
43+ BuildRequires: python3-dulwich
44+ BuildRequires: python3-tox-current-env
45+ BuildRequires: python3-filelock
46+ BuildRequires: python3-pip
3347BuildRequires: python3-babel
48+ BuildRequires: python3-wheel
49+ BuildRequires: python3-sphinxcontrib-apidoc
3450Requires: python-%{pkg_name }-lang = %{version }-%{release }
35- Requires: python3-pbr >= 2.0.0
3651
3752%description -n python3-%{pkg_name }
3853%{common_desc }
3954
4055%if 0%{?with_doc }
4156%package -n python-%{pkg_name }-doc
4257Summary: Documentation for OpenStack i18n library
43- BuildRequires: python3-sphinx
44- BuildRequires: python3-openstackdocstheme
45- BuildRequires: python3-sphinxcontrib-apidoc
4658
4759%description -n python-%{pkg_name }-doc
4860Documentation for the oslo.i18n library.
4961%endif
5062
5163%package -n python-%{pkg_name }-lang
52- Summary: Translation files for Oslo i18n library
64+ Summary: Translation files for Oslo i18n library
5365
5466%description -n python-%{pkg_name }-lang
5567Translation files for Oslo i18n library
5668
5769%prep
58- %autosetup -n %{pypi_name }-%{version }
59- rm -rf * .egg-info
70+ %autosetup -n %{pypi_name }-%{upstream_version } -S git
6071
61- # Let RPM handle the dependencies
62- rm -rf *requirements.txt
6372
64- %build
65- %py3_build
73+ sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
74+ sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps = /" tox.ini
75+ sed -i /^minversion.*/d tox.ini
76+ sed -i /^requires.*virtualenv.*/d tox.ini
6677
67- # Generate i18n files
68- python3 setup.py compile_catalog -d oslo_i18n/locale --domain oslo_i18n
78+ # Exclude some bad-known BRs
79+ for pkg in %{excluded_brs }; do
80+ for reqfile in doc/requirements.txt test-requirements.txt; do
81+ if [ -f $reqfile ]; then
82+ sed -i /^${pkg}.*/d $reqfile
83+ fi
84+ done
85+ done
86+
87+ # Automatic BR generation
88+ %generate_buildrequires
89+ %if 0%{?with_doc }
90+ %pyproject_buildrequires -t -e docs
91+ %else
92+ %pyproject_buildrequires
93+ %endif
94+
95+ %build
96+ %pyproject_wheel
6997
7098%install
71- %py3_install
99+ %pyproject_install
72100
73101%if 0%{?with_doc }
74- python3 setup.py build_sphinx --build-dir . -b html
102+ % tox -e docs
75103# remove the sphinx-build-3 leftovers
76- rm -rf html/.{doctrees,buildinfo}
104+ rm -rf doc/build/html/.{doctrees,buildinfo}
105+ rm -f doc/build/html/_static/images/docs/license.png
77106
78107# Fix this rpmlint warning
108+ if [ -f html/_static/jquery.js ]; then
79109sed -i "s|\r|| g" html/_static/jquery.js
110+ fi
80111%endif
81112
113+ # Generate i18n files
114+ python3 setup.py compile_catalog -d %{buildroot }%{python3_sitelib }/oslo_i18n/locale --domain oslo_i18n
115+
82116# Install i18n .mo files (.po and .pot are not required)
83117install -d -m 755 %{buildroot }%{_datadir }
84- rm -f oslo_i18n/locale/*/LC_*/oslo_i18n*po
85- rm -f oslo_i18n/locale/*pot
86- mv oslo_i18n/locale %{buildroot }%{_datadir }/locale
118+ rm -f %{ buildroot }%{ python3_sitelib }/ oslo_i18n/locale/*/LC_*/oslo_i18n*po
119+ rm -f %{ buildroot }%{ python3_sitelib }/ oslo_i18n/locale/*pot
120+ mv %{ buildroot }%{ python3_sitelib }/ oslo_i18n/locale %{buildroot }%{_datadir }/locale
87121
88122# Find language files
89123%find_lang oslo_i18n --all-name
@@ -92,21 +126,84 @@ mv oslo_i18n/locale %{buildroot}%{_datadir}/locale
92126%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
93127%license LICENSE
94128%{python3_sitelib }/oslo_i18n
95- %{python3_sitelib }/* .egg -info
129+ %{python3_sitelib }/* .dist -info
96130
97131%if 0%{?with_doc }
98132%files -n python-%{pkg_name }-doc
99133%license LICENSE
100- %doc html
134+ %doc doc/build/ html
101135%endif
102136
103137%files -n python-%{pkg_name }-lang -f oslo_i18n.lang
104138%license LICENSE
105139
106140%changelog
107- * Wed Mar 08 2023 Sumedh Sharma <sumsharma@microsoft.com> - 5.1.0-4
108- - Initial CBL-Mariner import from Fedora 37 (license: MIT)
109- - license verified
141+ * Mon Dec 22 2025 Archana Shettigar <v-shettigara@microsoft.com> - 6.7.1-2
142+ - Initial Azure Linux import from Fedora 44 (license: MIT)
143+ - License verified
144+
145+ * Thu Nov 20 2025 Gwyn Ciesla <gwync@protonmail.com> - 6.7.1-1
146+ - 6.7.1
147+
148+ * Thu Nov 13 2025 Gwyn Ciesla <gwync@protonmail.com> - 6.7.0-1
149+ - 6.7.0
150+
151+ * Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 6.4.0-7
152+ - Rebuilt for Python 3.14.0rc3 bytecode
153+
154+ * Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 6.4.0-6
155+ - Rebuilt for Python 3.14.0rc2 bytecode
156+
157+ * Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-5
158+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
159+
160+ * Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 6.4.0-4
161+ - Rebuilt for Python 3.14
162+
163+ * Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 6.4.0-3
164+ - Bootstrap for Python 3.14
165+
166+ * Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-2
167+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
168+
169+ * Mon Oct 07 2024 Joel Capitao <jcapitao@redhat.com> 6.4.0-1
170+ - Update to upstream version 6.4.0
171+
172+ * Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.0-5
173+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
174+
175+ * Mon Jun 10 2024 Python Maint <python-maint@redhat.com> - 6.3.0-4
176+ - Rebuilt for Python 3.13
177+
178+ * Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 6.3.0-3
179+ - Bootstrap for Python 3.13
180+
181+ * Mon May 06 2024 Alfredo Moralejo <amoralej@redhat.com> 6.3.0-2
182+ - Update to upstream version 6.3.0
183+
184+ * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-3
185+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
186+
187+ * Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-2
188+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
189+
190+ * Wed Oct 25 2023 Alfredo Moralejo <amoralej@gmail.com> 6.1.0-1
191+ - Update to upstream version 6.1.0
192+
193+ * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-4
194+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
195+
196+ * Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 6.0.0-3
197+ - Rebuilt for Python 3.12
198+
199+ * Wed Apr 19 2023 Karolina Kula <kkula@redhat.com> 6.0.0-2
200+ - Update to upstream version 6.0.0
201+
202+ * Thu Apr 13 2023 Alfredo Moralejo <amoralej@redhat.com> - 5.1.0-5
203+ - Fixed compatibility with sphinx >= 6.0
204+
205+ * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-4
206+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
110207
111208* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-3
112209- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
@@ -158,3 +255,4 @@ mv oslo_i18n/locale %{buildroot}%{_datadir}/locale
158255
159256* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 3.23.1-1
160257- Update to 3.23.1
258+
0 commit comments