Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
python-magnumclient.spec 4.66 KiB
# Macros for py2/py3 compatibility
%if 0%{?fedora} || 0%{?rhel} > 7
%global pyver %{python3_pkgversion}
%else
%global pyver 2
%endif
%global pyver_bin python%{pyver}
%global pyver_sitelib %python%{pyver}_sitelib
%global pyver_install %py%{pyver}_install
%global pyver_build %py%{pyver}_build
# End of macros for py2/py3 compatibility
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global sname python-magnumclient
%global pname magnumclient
%global with_doc 1

%global common_desc \
This is a client library for Magnum built on the Magnum API. \
It provides a Python API (the magnumclient module) and a \
command-line tool (magnum).

%global common_desc_tests Python-magnumclient test subpackage

Name:           python-%{pname}
Version:        2.15.0
Release:        1%{?dist}
Summary:        Client library for Magnum API

License:        ASL 2.0
URL:            https://launchpad.net/python-magnumclient
Source0:        https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
BuildArch:      noarch

%description
%{common_desc}

%package -n     python%{pyver}-%{pname}
Summary:        Client library for Magnum API
%{?python_provide:%python_provide python%{pyver}-%{pname}}
%if %{pyver} == 3
Obsoletes: python2-%{pname} < %{version}-%{release}
%endif

BuildRequires:  python%{pyver}-devel
BuildRequires:  python%{pyver}-setuptools
BuildRequires:  python%{pyver}-pbr
BuildRequires:  git
BuildRequires:  openstack-macros

# test dependencies
BuildRequires:  python%{pyver}-oslo-utils
BuildRequires:  python%{pyver}-openstackclient
BuildRequires:  python%{pyver}-oslo-serialization
BuildRequires:  python%{pyver}-oslo-log
BuildRequires:  python%{pyver}-osprofiler
BuildRequires:  python%{pyver}-stevedore
BuildRequires:  python%{pyver}-requests
BuildRequires:  python%{pyver}-oslo-i18n
BuildRequires:  python%{pyver}-fixtures
BuildRequires:  python%{pyver}-mock
BuildRequires:  python%{pyver}-testtools
BuildRequires:  python%{pyver}-keystoneauth1
BuildRequires:  python%{pyver}-prettytable

Requires:    python%{pyver}-babel
Requires:    python%{pyver}-cryptography
Requires:    python%{pyver}-keystoneauth1 >= 3.4.0
Requires:    python%{pyver}-oslo-i18n >= 3.15.3
Requires:    python%{pyver}-oslo-log >= 3.36.0
Requires:    python%{pyver}-oslo-serialization >= 2.18.0