142 lines
4.1 KiB
RPMSpec
142 lines
4.1 KiB
RPMSpec
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
|
|
|
%global with_doc 1
|
|
|
|
Name: python-openstackclient
|
|
Version: 4.0.2
|
|
Release: 1
|
|
Summary: OpenStack Command-line Client
|
|
License: Apache-2.0
|
|
URL: http://launchpad.net/%{name}
|
|
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: git
|
|
BuildRequires: openstack-macros
|
|
|
|
%description
|
|
python-openstackclient is a unified command-line client for the OpenStack APIs.
|
|
|
|
%package -n python3-openstackclient
|
|
Summary: OpenStack Command-line Client
|
|
%{?python_provide:%python_provide python3-openstackclient}
|
|
|
|
# Base build requires
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-pbr
|
|
BuildRequires: python3-pip
|
|
BuildRequires: python3-wheel
|
|
# General requires
|
|
BuildRequires: python3-babel
|
|
BuildRequires: python3-cliff
|
|
BuildRequires: python3-keystoneauth1
|
|
BuildRequires: python3-openstacksdk
|
|
BuildRequires: python3-osc-lib
|
|
BuildRequires: python3-oslo-i18n
|
|
BuildRequires: python3-oslo-utils
|
|
BuildRequires: python3-cinderclient
|
|
BuildRequires: python3-glanceclient
|
|
BuildRequires: python3-keystoneclient
|
|
BuildRequires: python3-novaclient
|
|
BuildRequires: python3-six
|
|
# General requires
|
|
Requires: python3-babel
|
|
Requires: python3-cliff
|
|
Requires: python3-keystoneauth1
|
|
Requires: python3-openstacksdk
|
|
Requires: python3-osc-lib
|
|
Requires: python3-oslo-i18n
|
|
Requires: python3-oslo-utils
|
|
Requires: python3-pbr
|
|
Requires: python3-cinderclient
|
|
Requires: python3-glanceclient
|
|
Requires: python3-keystoneclient
|
|
Requires: python3-novaclient
|
|
Requires: python3-six
|
|
Requires: python3-openstackclient-lang = %{version}-%{release}
|
|
Requires: python3-stevedore
|
|
|
|
%description -n python3-openstackclient
|
|
python-openstackclient is a unified command-line client for the OpenStack APIs.
|
|
|
|
%if 0%{?with_doc}
|
|
%package -n python-openstackclient-doc
|
|
Summary: Documentation for OpenStack Command-line Client
|
|
|
|
BuildRequires: python3-sphinx
|
|
BuildRequires: python3-openstackdocstheme
|
|
BuildRequires: python3-sphinxcontrib-apidoc
|
|
|
|
Requires: python3-openstackclient = %{version}-%{release}
|
|
|
|
%description -n python-openstackclient-doc
|
|
python-openstackclient is a unified command-line client for the OpenStack API.
|
|
This package contains auto-generated documentation.
|
|
%endif
|
|
|
|
%package -n python3-openstackclient-lang
|
|
Summary: Translation files for Openstackclient
|
|
|
|
%description -n python3-openstackclient-lang
|
|
Translation files for Openstackclient
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{name}-%{upstream_version}
|
|
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%{py3_build}
|
|
|
|
%{__python3} setup.py compile_catalog -d build/lib/openstackclient/locale --domain openstackclient
|
|
|
|
%install
|
|
%{py3_install}
|
|
|
|
ln -s openstack %{buildroot}%{_bindir}/openstack-3
|
|
|
|
%if 0%{?with_doc}
|
|
export PYTHONPATH=.
|
|
sphinx-build -b html doc/source doc/build/html
|
|
sphinx-build -b man doc/source doc/build/man
|
|
install -p -D -m 644 doc/build/man/openstack.1 %{buildroot}%{_mandir}/man1/openstack.1
|
|
|
|
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess
|
|
%endif
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}
|
|
rm -f %{buildroot}%{python3_sitelib}/openstackclient/locale/*/LC_*/openstackclient*po
|
|
rm -f %{buildroot}%{python3_sitelib}/openstackclient/locale/*pot
|
|
mv %{buildroot}%{python3_sitelib}/openstackclient/locale %{buildroot}%{_datadir}/locale
|
|
rm -rf %{buildroot}%{python3_sitelib}/openstackclient/locale
|
|
|
|
%find_lang openstackclient --all-name
|
|
|
|
%check
|
|
export PYTHON=%{__python3}
|
|
stestr run
|
|
|
|
%files -n python3-openstackclient
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%{_bindir}/openstack
|
|
%{_bindir}/openstack-3
|
|
%{python3_sitelib}/openstackclient
|
|
%{python3_sitelib}/*.egg-info
|
|
%if 0%{?with_doc}
|
|
%{_mandir}/man1/openstack.1*
|
|
|
|
%files -n python-openstackclient-doc
|
|
%license LICENSE
|
|
%doc doc/build/html
|
|
%endif
|
|
|
|
%files -n python3-openstackclient-lang -f openstackclient.lang
|
|
%license LICENSE
|
|
|
|
%changelog
|
|
* Mon Nov 8 2021 huangtianhua <huangtianhua@huawei.com> 4.0.2-1
|
|
- Init python-openstackclient with 4.0.2
|