923de83
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
162bd04
%global sources_gpg_sign 0x815afec729392386480e076dcc0dfe2d21c023c9
88f7c1e
d09c557
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
162bd04
# we are excluding some runtime reqs from automatic generator
162bd04
%global excluded_reqs tzdata
162bd04
# we are excluding some BRs from automatic generator
162bd04
%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order
162bd04
# Exclude sphinx from BRs if docs are disabled
162bd04
%if ! 0%{?with_doc}
162bd04
%global excluded_brs %{excluded_brs} sphinx openstackdocstheme
162bd04
%endif
162bd04
Nejc Saje a650e78
%global pypi_name oslo.serialization
9c8249b
%global pkg_name oslo-serialization
d1848db
%global with_doc 1
d1848db
b38fcef
%global common_desc \
b38fcef
An OpenStack library for representing objects in transmittable and \
b38fcef
storable formats.
b38fcef
9c8249b
Name:           python-%{pkg_name}
162bd04
Version:        5.2.0
24091df
Release:        3%{?dist}
Nejc Saje a650e78
Summary:        OpenStack oslo.serialization library
Nejc Saje a650e78
162bd04
License:        Apache-2.0
Nejc Saje a650e78
URL:            https://launchpad.net/oslo
0671926
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
923de83
# Required for tarball sources verification
923de83
%if 0%{?sources_gpg} == 1
923de83
Source101:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc
923de83
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
923de83
%endif
162bd04
%if %{lua:print(rpm.vercmp(rpm.expand("%{version}"), '5.2.0'));} < 0
162bd04
#TODO(jcapitao): remove the line below once https://review.opendev.org/c/openstack/oslo.serialization/+/887141
162bd04
# is contained in a tag.
162bd04
Patch0001:        0001-Remove-extra-spaces-in-tox.ini.patch
162bd04
%endif
Nejc Saje a650e78
BuildArch:      noarch
Nejc Saje a650e78
923de83
# Required for tarball sources verification
923de83
%if 0%{?sources_gpg} == 1
923de83
BuildRequires:  /usr/bin/gpgv2
923de83
%endif
923de83
d10f64e
%description
b38fcef
%{common_desc}
d10f64e
45672e8
%package -n python3-%{pkg_name}
d10f64e
Summary:        OpenStack oslo.serialization library
d10f64e
afd4afc
BuildRequires:  git-core
45672e8
BuildRequires:  python3-devel
162bd04
BuildRequires:  pyproject-rpm-macros
45672e8
Requires:       python3-pytz
45672e8
45672e8
%description -n python3-%{pkg_name}
b38fcef
%{common_desc}
d10f64e
88f7c1e
45672e8
%package -n python3-%{pkg_name}-tests
88f7c1e
Summary:   Tests for OpenStack Oslo serialization library
88f7c1e
45672e8
Requires:  python3-%{pkg_name} = %{version}-%{release}
45672e8
Requires:  python3-oslotest
45672e8
Requires:  python3-oslo-i18n
45672e8
Requires:  python3-stestr
45672e8
Requires:  python3-netaddr
45672e8
Requires:  python3-simplejson
88f7c1e
45672e8
%description -n python3-%{pkg_name}-tests
88f7c1e
Tests for OpenStack Oslo serialization library
88f7c1e
d1848db
%if 0%{?with_doc}
9c8249b
%package -n python-%{pkg_name}-doc
9c8249b
Summary:    Documentation for the Oslo serialization library
9c8249b
45672e8
Requires:  python3-%{pkg_name} = %{version}-%{release}
9c8249b
9c8249b
%description -n python-%{pkg_name}-doc
9c8249b
Documentation for the Oslo serialization library.
d1848db
%endif
9c8249b
Nejc Saje a650e78
%prep
923de83
# Required for tarball sources verification
923de83
%if 0%{?sources_gpg} == 1
923de83
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
923de83
%endif
a3a1d73
%autosetup -n %{pypi_name}-%{upstream_version} -S git
162bd04
162bd04
sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
162bd04
sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini
162bd04
sed -i /^minversion.*/d tox.ini
162bd04
sed -i /^requires.*virtualenv.*/d tox.ini
162bd04
162bd04
# Exclude some bad-known BRs
162bd04
for pkg in %{excluded_brs};do
162bd04
  for reqfile in doc/requirements.txt test-requirements.txt; do
162bd04
    if [ -f $reqfile ]; then
162bd04
      sed -i /^${pkg}.*/d $reqfile
162bd04
    fi
162bd04
  done
162bd04
done
162bd04
162bd04
# Automatic BR generation
162bd04
# Exclude some bad-known runtime reqs
162bd04
for pkg in %{excluded_reqs};do
162bd04
  sed -i /^${pkg}.*/d requirements.txt
162bd04
done
162bd04
162bd04
%generate_buildrequires
162bd04
%if 0%{?with_doc}
162bd04
  %pyproject_buildrequires -t -e %{default_toxenv},docs
162bd04
%else
162bd04
  %pyproject_buildrequires -t -e %{default_toxenv}
162bd04
%endif
Nejc Saje a650e78
Nejc Saje a650e78
%build
162bd04
%pyproject_wheel
9c8249b
d1848db
%if 0%{?with_doc}
9c8249b
# doc
162bd04
%tox -e docs
9c8249b
# Fix hidden-file-or-dir warnings
88f7c1e
rm -fr doc/build/html/.{doctrees,buildinfo}
d1848db
%endif
d1848db
Nejc Saje a650e78
%install
162bd04
%pyproject_install
d10f64e
d10f64e
%check
d1848db
export OS_TEST_PATH="./oslo_serialization/tests"
162bd04
%tox -e %{default_toxenv}
Nejc Saje a650e78
45672e8
%files -n python3-%{pkg_name}
d10f64e
%doc README.rst
d10f64e
%license LICENSE
45672e8
%{python3_sitelib}/oslo_serialization
162bd04
%{python3_sitelib}/*.dist-info
45672e8
%exclude %{python3_sitelib}/oslo_serialization/tests
d10f64e
d1848db
%if 0%{?with_doc}
9c8249b
%files -n python-%{pkg_name}-doc
b38fcef
%doc doc/build/html
d10f64e
%license LICENSE
d1848db
%endif
Nejc Saje a650e78
45672e8
%files -n python3-%{pkg_name}-tests
45672e8
%{python3_sitelib}/oslo_serialization/tests
Alan Pevec 417851e
9c8249b
%changelog
24091df
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
24091df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
24091df
69fdb29
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
69fdb29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
69fdb29
162bd04
* Thu Oct 26 2023 Alfredo Moralejo <amoralej@gmail.com> 5.2.0-1
162bd04
- Update to upstream version 5.2.0
162bd04
15dacdd
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3
15dacdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
15dacdd
fdf9c6e
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 5.1.1-2
fdf9c6e
- Rebuilt for Python 3.12
fdf9c6e
f82a679
* Fri Apr 14 2023 Karolina Kula <kkula@redhat.com> 5.1.1-1
f82a679
- Update to upstream version 5.1.1
f82a679
cbf9aba
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-2
cbf9aba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
cbf9aba
18b3710
* Thu Nov 17 2022 Alfredo Moralejo <amoralej@redhat.com> 5.0.0-1
18b3710
- Update to upstream version 5.0.0
18b3710
a64ea90
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-3
a64ea90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
a64ea90
eaa0bef
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 4.3.0-2
eaa0bef
- Rebuilt for Python 3.11
eaa0bef
cfa1c50
* Wed May 18 2022 Joel Capitao <jcapitao@redhat.com> 4.3.0-1
cfa1c50
- Update to upstream version 4.3.0
cfa1c50
79e98cf
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-4
79e98cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
79e98cf
6844248
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-3
6844248
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
6844248
ba5a5df
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.1.0-2
ba5a5df
- Rebuilt for Python 3.10
ba5a5df
afd4afc
* Tue Mar 16 2021 Joel Capitao <jcapitao@redhat.com> 4.1.0-1
afd4afc
- Update to upstream version 4.1.0
afd4afc
5edeeba
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
5edeeba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5edeeba
923de83
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 4.0.1-2
923de83
- Update to upstream version 4.0.1
923de83
9aac41a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
9aac41a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9aac41a
45672e8
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 3.1.1-1
45672e8
- Update to upstream version 3.1.1
45672e8
45fb86f
* Mon Jun 01 2020 Alfredo Moralejo <amoralej@redhat.com> - 2.29.2-5
45fb86f
- Remove hacking as build requirement
45fb86f
efdf4f0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.29.2-4
efdf4f0
- Rebuilt for Python 3.9
efdf4f0
611794d
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.29.2-3
611794d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
611794d
88f7c1e
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 2.29.2-2
88f7c1e
- Update to upstream version 2.29.2
88f7c1e
b0ef626
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.28.2-4
b0ef626
- Rebuilt for Python 3.8.0rc1 (#1748018)
b0ef626
ac0369f
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.28.2-3
ac0369f
- Rebuilt for Python 3.8
ac0369f
e2d605c
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.2-2
e2d605c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e2d605c
d1848db
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 2.28.2-1
d1848db
- Update to 2.28.2
Alan Pevec c36300b