80 lines
2.4 KiB
Django/Jinja
80 lines
2.4 KiB
Django/Jinja
{% set pypi_name = 'oslo.serialization' %}
|
|
{% set upstream_version = upstream_version('5.4.0') %}
|
|
{% set rpm_release = '1' %}
|
|
{% set source = url_pypi() %}
|
|
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: OpenStack serialization library
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://docs.openstack.org/{{ pypi_name }}
|
|
Source0: {{ source }}
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py3('msgpack') }}
|
|
BuildRequires: {{ py3('netaddr') }}
|
|
BuildRequires: {{ py3('oslo.i18n') }}
|
|
BuildRequires: {{ py3('oslo.utils') }}
|
|
BuildRequires: {{ py3('oslotest') }}
|
|
BuildRequires: {{ py3('pbr') }}
|
|
BuildRequires: {{ py3('stestr') }}
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
The oslo.serialization library provides support for representing objects
|
|
in transmittable and storable formats, such as Base64, JSON and MessagePack.
|
|
|
|
%package -n {{ py2name(py_versions='py3') }}
|
|
Summary: OpenStack serialization library
|
|
Requires: {{ py3('msgpack') }}
|
|
Requires: {{ py3('oslo.utils') }}
|
|
Requires: {{ py3('pytz') }}
|
|
|
|
%description -n {{ py2name(py_versions='py3') }}
|
|
The oslo.serialization library provides support for representing objects
|
|
in transmittable and storable formats, such as Base64, JSON and MessagePack.
|
|
|
|
This package contains the Python 3.x module.
|
|
|
|
%package -n {{ py2name() }}-doc
|
|
Summary: Documentation for OpenStack serialization library
|
|
BuildRequires: {{ py3('Sphinx') }}
|
|
BuildRequires: {{ py3('openstackdocstheme') }}
|
|
|
|
%description -n {{ py2name() }}-doc
|
|
The oslo.serialization library provides support for representing objects
|
|
in transmittable and storable formats, such as Base64, JSON and MessagePack.
|
|
This package contains the documentation.
|
|
|
|
%prep
|
|
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
|
sed -i -e "s,bandit.*,," test-requirements.txt
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%{py3_build}
|
|
|
|
# generate html docs
|
|
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
|
|
# remove the sphinx-build leftovers
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
%install
|
|
%{py3_install}
|
|
|
|
%check
|
|
%{openstack_stestr_run}
|
|
|
|
%files -n {{ py2name(py_versions='py3') }}
|
|
%license LICENSE
|
|
%doc README.rst ChangeLog
|
|
%{python3_sitelib}/oslo_serialization
|
|
%{python3_sitelib}/*.egg-info
|
|
|
|
%files -n {{ py2name() }}-doc
|
|
%license LICENSE
|
|
%doc doc/build/html
|
|
|
|
%changelog
|