File python-azurectl.spec of Package python-azurectl.2720

#
# spec file for package python-azurectl
#
Name:           python-azurectl
Version:        2.0.7
Release:        0
Url:            https://github.com/SUSE/azurectl
Summary:        Command Line Interface to manage Microsoft Azure services
License:        Apache-2.0
Group:          Development/Languages/Python
Source:         python-azurectl-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-docopt
Requires:       python-APScheduler
Requires:       python-pyliblzma
Requires:       python-azure-sdk >= 1.0.3
Requires:       python-azure-sdk-storage >= 0.30.0
Requires:       python-dateutil
Requires:       python-dnspython
Requires:       python-setuptools
Requires:       man
Requires:       openssl
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
Management tool for the Microsoft Azure public cloud service.
It allows uploading, registering and maintaining OS images for
multiple Azure Account Subscriptions.

%prep
%setup -q -n azurectl-%{version}

%build
python setup.build.py build

%install
python setup.build.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}/etc/bash_completion.d
cp completion/azurectl.sh %{buildroot}/etc/bash_completion.d

mkdir -p %{buildroot}/%{_mandir}/man1
for i in doc/man/*.gz; do \
    install -m 644 $i %{buildroot}/usr/share/man/man1 ;\
done

%files
%defattr(-,root,root,-)
%{_bindir}/azurectl
%{python_sitelib}/*
%config /etc/bash_completion.d/azurectl.sh
%doc %{_mandir}/man1/*
%changelog
openSUSE Build Service is sponsored by