Blame python-os-service-types.spec

a898593
# Macros for py2/py3 compatibility
a898593
%if 0%{?fedora} || 0%{?rhel} > 7
a898593
%global pyver %{python3_pkgversion}
a898593
%else
a898593
%global pyver 2
a898593
%endif
a898593
%global pyver_bin python%{pyver}
76edc4c
%global pyver_sitelib %{expand:%{python%{pyver}_sitelib}}
76edc4c
%global pyver_install %{expand:%{py%{pyver}_install}}
76edc4c
%global pyver_build %{expand:%{py%{pyver}_build}}
a898593
# End of macros for py2/py3 compatibility
a898593
098ba18
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
b4eeadb
%global pypi_name os-service-types
b4eeadb
%global module_name os_service_types
b4eeadb
a898593
# Needed for train bootstrap
5368979
%global repo_bootstrap 1
098ba18
b4eeadb
%global common_desc \
098ba18
OsServiceTypes is a Python library for consuming OpenStack sevice-types-authority data \
b4eeadb
The OpenStack Service Types Authority contains information about official \
b4eeadb
OpenStack services and their historical service-type aliases. \
b4eeadb
The data is in JSON and the latest data should always be used. This simple \
b4eeadb
library exists to allow for easy consumption of the data, along with a built-in \
098ba18
version of the data to use in case network access is for some reason not possible \
098ba18
and local caching of the fetched data.
098ba18
098ba18
%global with_doc 1
b4eeadb
b4eeadb
Name:           python-%{pypi_name}
a898593
Version:        1.7.0
2d22307
Release:        12%{?dist}
b4eeadb
Summary:        Python library for consuming OpenStack sevice-types-authority data
b4eeadb
b4eeadb
License:        ASL 2.0
b4eeadb
URL:            http://www.openstack.org/
098ba18
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
b4eeadb
BuildArch:      noarch
b4eeadb
b4eeadb
BuildRequires:  git
b6ee4f2
b4eeadb
%description
b4eeadb
%{common_desc}
b4eeadb
a898593
%package -n     python%{pyver}-%{pypi_name}
b4eeadb
Summary:        %{summary}
a898593
%{?python_provide:%python_provide python%{pyver}-%{pypi_name}}
a898593
a898593
BuildRequires:  python%{pyver}-devel
a898593
BuildRequires:  python%{pyver}-pbr
a898593
BuildRequires:  python%{pyver}-subunit
a898593
BuildRequires:  python%{pyver}-testscenarios
a898593
BuildRequires:  python%{pyver}-setuptools
a898593
BuildRequires:  python%{pyver}-requests-mock
a898593
098ba18
%if 0%{?repo_bootstrap} == 0
a898593
BuildRequires:  python%{pyver}-keystoneauth1
a898593
BuildRequires:  python%{pyver}-oslotest
098ba18
%endif
b6ee4f2
a898593
Requires:       python%{pyver}-pbr >= 2.0.0
a898593
%description -n python%{pyver}-%{pypi_name}
b4eeadb
%{common_desc}
b4eeadb
098ba18
%if 0%{?with_doc}
b4eeadb
%package -n python-%{pypi_name}-doc
b4eeadb
Summary:        %{pypi_name} documentation
b4eeadb
a898593
BuildRequires:  python%{pyver}-openstackdocstheme
a898593
BuildRequires:  python%{pyver}-sphinx
b4eeadb
b4eeadb
%description -n python-%{pypi_name}-doc
b4eeadb
%{common_desc}
b4eeadb
098ba18
b4eeadb
Documentation for %{pypi_name}
098ba18
%endif
b4eeadb
b4eeadb
%prep
098ba18
%autosetup -n %{pypi_name}-%{upstream_version} -S git
098ba18
# Let RPM handle the dependencies
098ba18
rm -rf {test-,}requirements.txt
b4eeadb
# Remove bundled egg-info
b4eeadb
rm -rf %{pypi_name}.egg-info
b4eeadb
b4eeadb
%build
a898593
%{pyver_build}
098ba18
098ba18
%if 0%{?with_doc}
b6ee4f2
# generate html docs
a898593
%{pyver_bin} setup.py build_sphinx -b html
a898593
# remove the sphinx-build-%{pyver} leftovers
b4eeadb
rm -rf doc/build/html/.{doctrees,buildinfo}
098ba18
%endif
b4eeadb
b4eeadb
%install
a898593
%{pyver_install}
098ba18
b4eeadb
%check
098ba18
%if 0%{?repo_bootstrap} == 0
a898593
%{pyver_bin} setup.py test
098ba18
%endif
098ba18
a898593
%files -n python%{pyver}-%{pypi_name}
b4eeadb
%license LICENSE
b4eeadb
%doc README.rst doc/source/readme.rst
a898593
%{pyver_sitelib}/%{module_name}
35b4358
%{pyver_sitelib}/%{module_name}-%{upstream_version}-py%{python3_version}.egg-info
b4eeadb
098ba18
%if 0%{?with_doc}
b4eeadb
%files -n python-%{pypi_name}-doc
b4eeadb
%license LICENSE
b6ee4f2
%doc doc/build/html
098ba18
%endif
b4eeadb
b4eeadb
%changelog
2d22307
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-12
2d22307
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2d22307
f3021ce
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-11
f3021ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
f3021ce
123e474
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 1.7.0-10
123e474
- Rebuilt for Python 3.11
123e474
7371e8c
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-9
7371e8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
7371e8c
f6fcf23
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-8
f6fcf23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f6fcf23
59b11a7
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.7.0-7
59b11a7
- Rebuilt for Python 3.10
59b11a7
1226134
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-6
1226134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
1226134
d6ae59f
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-5
d6ae59f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d6ae59f
b840939
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-4
b840939
- Rebuilt for Python 3.9
b840939
216a34d
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
216a34d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
216a34d
a898593
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 1.7.0-2
a898593
- Update to upstream version 1.7.0
a898593
3b8f9cb
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.0-5
3b8f9cb
- Rebuilt for Python 3.8.0rc1 (#1748018)
3b8f9cb
bf9d09a
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.0-4
bf9d09a
- Rebuilt for Python 3.8
bf9d09a
92d97f3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
92d97f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
92d97f3
098ba18
* Fri Mar 08 2019 Alfredo Morlejo <amoralej@redhat.com> 1.6.0-2
098ba18
- Disable bootstrap mode.
4b03606
098ba18
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 1.6.0-1
098ba18
- Update to 1.6.0
9bf30da