StarlingX Fault Management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.8 KiB

# spec file for package python
%global pypi_name fmclient
Name: python-%{pypi_name}
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: A python client library for Fault Management
License: Apache-2.0
Group: Development/Tools/Other
Source0: %{name}-%{version}.tar.gz
BuildRequires: git
BuildRequires: python-setuptools
BuildRequires: python2-pbr
BuildRequires: python3-pbr
Requires: bash-completion
Requires: python-keystoneauth1 >= 3.1.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.utils >= 3.20.0
Requires: python-pbr >= 2.0.0
Requires: python-requests
Requires: python-six >= 1.9.0
A python client library for StarlingX Fault Management service
%define local_etc_bash_completiond %{_sysconfdir}/bash_completion.d/
%define pythonroot %{_libdir}/python2.7/site-packages
%define debug_package %{nil}
%autosetup -n %{name}-%{version}/fmclient
# Remove bundled egg-info
rm -rf *.egg-info
export PBR_VERSION=%{version}
python build
export PBR_VERSION=%{version}
python install --root=%{buildroot} \
--install-lib=%{pythonroot} \
--prefix=%{_prefix} \
--install-data=%{_datadir} \
install -d -m 755 %{buildroot}%{local_etc_bash_completiond}
install -p -D -m 664 tools/fm.bash_completion %{buildroot}%{local_etc_bash_completiond}/fm.bash_completion
%license LICENSE
%config %{local_etc_bash_completiond}/*