Files
rpm-packaging/openstack/oslo.cache/oslo.cache.spec.j2
Dirk Mueller 81330487a6 Remove explict sed for doc build warnings
This is now obsolete, as the %py_req_cleanup macro does that
as a side-effect.

Change-Id: Ie8ae07e53f90ea5d183f89c82b27ad8ae76c0fd2
2019-03-11 16:56:23 +00:00

82 lines
2.8 KiB
Django/Jinja

{% set pypi_name = 'oslo.cache' %}
{% set upstream_version = upstream_version('1.33.2') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: Cache storage for Openstack projects
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://launchpad.net/%{sname}
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('dogpile.cache', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('mock', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.config', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.i18n', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.log', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.utils', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('pymongo', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('python-memcached', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('six', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('stestr', py_versions=['py2', 'py3']) }}
Requires: {{ py2pkg('dogpile.cache') }}
Requires: {{ py2pkg('oslo.config') }}
Requires: {{ py2pkg('oslo.i18n') }}
Requires: {{ py2pkg('oslo.log') }}
Requires: {{ py2pkg('oslo.utils') }}
Requires: {{ py2pkg('python-memcached') }}
Requires: {{ py2pkg('six') }}
BuildArch: noarch
%python_subpackages
%description
oslo.cache aims to provide a generic caching mechanism for OpenStack projects
by wrapping the dogpile.cache library. The dogpile.cache library provides
support memoization, key value storage and interfaces to common caching
backends such as Memcached.
%package -n {{ py2name() }}-doc
Summary: Documentation for the OpenStack Oslo Cache library
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('openstackdocstheme') }}
BuildRequires: {{ py2pkg('sphinxcontrib-apidoc') }}
%description -n {{ py2name() }}-doc
Documentation for the OpenStack Oslo cache library.
%prep
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
%py_req_cleanup
%build
%{python_build}
%install
%{python_install}
# generate html docs
PBR_VERSION={{ upstream_version }} sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
%python_exec -m stestr.cli run
%files %{python_files}
%license LICENSE
%doc README.rst ChangeLog
%{python_sitelib}/oslo_cache
%{python_sitelib}/*.egg-info
%files -n {{ py2name() }}-doc
%license LICENSE
%doc doc/build/html
%changelog