Blame python-oslo-concurrency.spec

05465b4
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
05465b4
%global sources_gpg_sign 0x2426b928085a020d8a90d0d879ab7008d0896c8a
830c76e
eb85461
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
2b9f8ee
%global with_doc 1
eb85461
a8e1444
%global pypi_name oslo.concurrency
Alan Pevec 973c74f
%global pkg_name oslo-concurrency
a8e1444
2b9f8ee
%global common_desc \
2b9f8ee
Oslo concurrency library has utilities for safely running multi-thread, \
2b9f8ee
multi-process applications using locking mechanisms and for running \
2b9f8ee
external processes.
2b9f8ee
2b9f8ee
%global common_desc2 \
2b9f8ee
Tests for the Oslo concurrency library.
2b9f8ee
a8e1444
Name:           python-oslo-concurrency
05465b4
Version:        4.3.0
bdc5db3
Release:        2%{?dist}
Alan Pevec e2afff7
Summary:        OpenStack Oslo concurrency library
a8e1444
a8e1444
License:        ASL 2.0
Alan Pevec e2afff7
URL:            https://launchpad.net/oslo
ad96689
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
05465b4
# Required for tarball sources verification
05465b4
%if 0%{?sources_gpg} == 1
05465b4
Source101:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc
05465b4
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
05465b4
%endif
a8e1444
BuildArch:      noarch
a8e1444
05465b4
# Required for tarball sources verification
05465b4
%if 0%{?sources_gpg} == 1
05465b4
BuildRequires:  /usr/bin/gpgv2
05465b4
%endif
05465b4
4b8a6f5
%description
2b9f8ee
%{common_desc}
4b8a6f5
5be41c4
%package -n python3-%{pkg_name}
6719344
Summary:        OpenStack Oslo concurrency library
5be41c4
%{?python_provide:%python_provide python3-%{pkg_name}}
6719344
5be41c4
BuildRequires:  python3-devel
5be41c4
BuildRequires:  python3-pbr
6719344
BuildRequires:  git
6719344
# Required for tests
5be41c4
BuildRequires:  python3-hacking
5be41c4
BuildRequires:  python3-oslotest
5be41c4
BuildRequires:  python3-fixtures
5be41c4
BuildRequires:  python3-eventlet
5be41c4
BuildRequires:  python3-oslo-config
5be41c4
BuildRequires:  python3-oslo-utils
5be41c4
BuildRequires:  python3-fasteners
6719344
# Required to compile translation files
5be41c4
BuildRequires:  python3-babel
6719344
5be41c4
Requires:       python3-pbr
5be41c4
Requires:       python3-oslo-config >= 2:5.2.0
5be41c4
Requires:       python3-oslo-i18n >= 3.15.3
5be41c4
Requires:       python3-oslo-utils >= 3.33.0
5be41c4
Requires:       python3-fasteners
6719344
6719344
Requires:       python-%{pkg_name}-lang = %{version}-%{release}
6719344
5be41c4
%description -n python3-%{pkg_name}
6719344
%{common_desc}
6719344
2b9f8ee
%if 0%{?with_doc}
a8e1444
eb85461
%package  -n python-%{pkg_name}-doc
Alan Pevec e2afff7
Summary:    Documentation for the Oslo concurrency library
830c76e
Group:      Documentation
5be41c4
BuildRequires:  python3-sphinx
5be41c4
BuildRequires:  python3-openstackdocstheme
5be41c4
BuildRequires:  python3-sphinxcontrib-apidoc
Alan Pevec e2afff7
eb85461
%description -n python-%{pkg_name}-doc
Alan Pevec e2afff7
Documentation for the Oslo concurrency library.
a8e1444
2b9f8ee
%endif
2b9f8ee
5be41c4
%package  -n python3-%{pkg_name}-tests
1f93403
Summary:    Tests for the Oslo concurrency library
5be41c4
%{?python_provide:%python_provide python3-%{pkg_name}-tests}
5be41c4
5be41c4
Requires:  python3-%{pkg_name} = %{version}-%{release}
5be41c4
Requires:  python3-hacking
5be41c4
Requires:  python3-oslotest
5be41c4
Requires:  python3-fixtures
4b8a6f5
5be41c4
%description -n python3-%{pkg_name}-tests
2b9f8ee
%{common_desc2}
eb85461
1f93403
%package  -n python-%{pkg_name}-lang
1f93403
Summary:   Translation files for Oslo concurrency library
1f93403
1f93403
%description -n python-%{pkg_name}-lang
1f93403
Translation files for Oslo concurrency library
0cfbb35
a8e1444
%prep
05465b4
# Required for tarball sources verification
05465b4
%if 0%{?sources_gpg} == 1
05465b4
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
05465b4
%endif
2b9f8ee
%autosetup -n %{pypi_name}-%{upstream_version} -S git
Alan Pevec e2afff7
# Let RPM handle the dependencies
eb85461
rm -rf {test-,}requirements.txt
a8e1444
Alan Pevec e2afff7
%build
5be41c4
%{py3_build}
a8e1444
1f93403
# Generate i18n files
05465b4
python3 setup.py compile_catalog -d build/lib/oslo_concurrency/locale --domain oslo_concurrency
1f93403
2b9f8ee
%if 0%{?with_doc}
a8e1444
# generate html docs
5be41c4
sphinx-build-3 -b html doc/source doc/build/html
5be41c4
# remove the sphinx-build-3 leftovers
2b9f8ee
rm -rf doc/build/html/.{doctrees,buildinfo}
2b9f8ee
%endif
a8e1444
eb85461
%install
5be41c4
%{py3_install}
5be41c4
ln -s ./lockutils-wrapper %{buildroot}%{_bindir}/lockutils-wrapper-3
0cfbb35
1f93403
# Install i18n .mo files (.po and .pot are not required)
1f93403
install -d -m 755 %{buildroot}%{_datadir}
5be41c4
rm -f %{buildroot}%{python3_sitelib}/oslo_concurrency/locale/*/LC_*/oslo_concurrency*po
5be41c4
rm -f %{buildroot}%{python3_sitelib}/oslo_concurrency/locale/*pot
5be41c4
mv %{buildroot}%{python3_sitelib}/oslo_concurrency/locale %{buildroot}%{_datadir}/locale
1f93403
1f93403
# Find language files
1f93403
%find_lang oslo_concurrency --all-name
0cfbb35
eb85461
%check
830c76e
export PYTHON_DISALLOW_AMBIGUOUS_VERSION=0
05465b4
python3 setup.py test || true
6719344
5be41c4
%files -n python3-%{pkg_name}
6719344
%doc README.rst
6719344
%license LICENSE
6719344
%{_bindir}/lockutils-wrapper
5be41c4
%{_bindir}/lockutils-wrapper-3
5be41c4
%{python3_sitelib}/oslo_concurrency
5be41c4
%{python3_sitelib}/*.egg-info
5be41c4
%exclude %{python3_sitelib}/oslo_concurrency/tests
a8e1444
2b9f8ee
%if 0%{?with_doc}
eb85461
%files -n python-%{pkg_name}-doc
Alan Pevec e2afff7
%license LICENSE
2b9f8ee
%doc doc/build/html
2b9f8ee
%endif
Alan Pevec e2afff7
5be41c4
%files -n python3-%{pkg_name}-tests
5be41c4
%{python3_sitelib}/oslo_concurrency/tests
Alan Pevec 13a3f30
6719344
%files -n python-%{pkg_name}-lang -f oslo_concurrency.lang
eb85461
%license LICENSE
0cfbb35
eb85461
%changelog
05465b4
* Wed Oct 21 2020 Joel Capitao <jcapitao@redhat.com> 4.3.0-2
05465b4
- Enable sources tarball validation using GPG signature.
05465b4
05465b4
* Thu Sep 17 2020 RDO <dev@lists.rdoproject.org> 4.3.0-1
05465b4
- Update to 4.3.0
05465b4
bdc5db3
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-2
bdc5db3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
bdc5db3
5be41c4
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 4.0.2-1
5be41c4
- Update to upstream version 4.0.2
5be41c4
3467099
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.30.0-4
3467099
- Rebuilt for Python 3.9
3467099
d4cfa2e
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.30.0-3
d4cfa2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d4cfa2e
6719344
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 3.30.0-2
6719344
- Update to upstream version 3.30.0
6719344
6b350ad
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.29.1-4
6b350ad
- Rebuilt for Python 3.8.0rc1 (#1748018)
6b350ad
509c6f0
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.29.1-3
509c6f0
- Rebuilt for Python 3.8
509c6f0
c93663b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.29.1-2
c93663b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c93663b
830c76e
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 3.29.1-1
830c76e
- Update to 3.29.1
53f6d59