bda3410760
Change-Id: Ica2460af23c4a03d7e20201c590dd93cf7ce7f49
82 lines
3.1 KiB
Django/Jinja
82 lines
3.1 KiB
Django/Jinja
{% set pypi_name = 'os-service-types' %}
|
|
{% set upstream_version = upstream_version('1.4.0') %}
|
|
{% set rpm_release = '1' %}
|
|
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: Python library for consuming OpenStack sevice-types-authority data
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://docs.openstack.org/developer/os-service-types
|
|
Source0: https://files.pythonhosted.org/packages/source/o/{{ pypi_name }}/{{ pypi_name }}-%{version}.tar.gz
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('python-subunit', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('requests-mock', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('stestr', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('testscenarios', py_versions=['py2', 'py3']) }}
|
|
Requires: {{ py2pkg('pbr') }}
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
The OpenStack Service Types Authority contains information about official
|
|
OpenStack services and their historical service-type aliases.
|
|
The data is in JSON and the latest data should always be used. This simple
|
|
library exists to allow for easy consumption of the data, along with a built-in
|
|
version of the data to use in case network access is for some reason not
|
|
possible and local caching of the fetched data.
|
|
|
|
%package -n {{ pypi_name }}-doc
|
|
Summary: Documentation for OpenStack os-service-types library
|
|
BuildRequires: {{ py2pkg('Sphinx') }}
|
|
BuildRequires: {{ py2pkg('openstackdocstheme') }}
|
|
|
|
%description -n {{ pypi_name }}-doc
|
|
The OpenStack Service Types Authority contains information about official
|
|
OpenStack services and their historical service-type aliases.
|
|
The data is in JSON and the latest data should always be used. This simple
|
|
library exists to allow for easy consumption of the data, along with a built-in
|
|
version of the data to use in case network access is for some reason not
|
|
possible and local caching of the fetched data.
|
|
This package contains the documentation.
|
|
|
|
%prep
|
|
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
|
%py_req_cleanup
|
|
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
|
|
# The TestRemote test cases must be excluded because they introduce a circular
|
|
# dependency on python-keystoneauth1.
|
|
# Using --black-regex with stestr is not enough because the problem occurs when
|
|
# keystoneauth is imported, not when the test is run.
|
|
rm os_service_types/tests/test_remote.py
|
|
|
|
%build
|
|
%{python_build}
|
|
|
|
# generate html docs
|
|
%{__python2} setup.py build_sphinx
|
|
# remove the sphinx-build leftovers
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
%install
|
|
%{python_install}
|
|
|
|
%check
|
|
export OS_TEST_PATH=os_service_types/tests
|
|
%python_exec -m stestr.cli run
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst ChangeLog
|
|
%{python_sitelib}/os_service_types
|
|
%{python_sitelib}/*.egg-info
|
|
|
|
%files -n {{ pypi_name }}-doc
|
|
%license LICENSE
|
|
%doc doc/build/html
|
|
|
|
%changelog
|