add spec and source package
This commit is contained in:
parent
58c611b24a
commit
4ab213148b
BIN
python-openstackclient-5.4.0.tar.gz
Normal file
BIN
python-openstackclient-5.4.0.tar.gz
Normal file
Binary file not shown.
148
python-openstackclient.spec
Normal file
148
python-openstackclient.spec
Normal file
@ -0,0 +1,148 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
|
||||
%global with_doc 1
|
||||
|
||||
Name: python-openstackclient
|
||||
Version: 5.4.0
|
||||
Release: 2
|
||||
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}
|
||||
Obsoletes: python2-openstackclient < %{version}-%{release}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-oslo-i18n
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-keystoneclient
|
||||
BuildRequires: python3-novaclient
|
||||
BuildRequires: python3-cinderclient
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-os-client-config
|
||||
BuildRequires: python3-cliff
|
||||
BuildRequires: python3-simplejson
|
||||
BuildRequires: python3-requests-mock
|
||||
BuildRequires: python3-babel
|
||||
BuildRequires: python3-stestr
|
||||
BuildRequires: python3-osc-lib-tests
|
||||
BuildRequires: python3-fixtures
|
||||
BuildRequires: python3-oslotest
|
||||
BuildRequires: python3-reno
|
||||
BuildRequires: python3-requestsexceptions
|
||||
BuildRequires: python3-openstacksdk
|
||||
BuildRequires: python3-ddt
|
||||
|
||||
Requires: python3-pbr
|
||||
Requires: python3-openstacksdk >= 0.48.0
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-utils >= 3.33.0
|
||||
Requires: python3-keystoneclient >= 1:3.22.0
|
||||
Requires: python3-novaclient >= 1:15.1.0
|
||||
Requires: python3-cinderclient >= 3.3.0
|
||||
Requires: python3-neutronclient >= 6.7.0
|
||||
Requires: python3-six >= 1.10.0
|
||||
Requires: python3-osc-lib >= 2.0.0
|
||||
Requires: python3-cliff
|
||||
|
||||
Requires: python-openstackclient-lang = %{version}-%{release}
|
||||
Requires: python3-stevedore >= 2.0.1
|
||||
|
||||
|
||||
%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 python-openstackclient-lang
|
||||
Summary: Translation files for Openstackclient
|
||||
|
||||
%description -n python-openstackclient-lang
|
||||
Translation files for Openstackclient
|
||||
|
||||
%prep
|
||||
|
||||
%autosetup -n %{name}-%{upstream_version} -S git
|
||||
|
||||
%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 python-openstackclient-lang -f openstackclient.lang
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Sat Jan 30 2021 zhangy <zhangy1317@foxmail.com>
|
||||
- spec generated
|
||||
Loading…
x
Reference in New Issue
Block a user