%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global tarball_name cloudmonkey Name: cloudmonkey Version: 5.3.0 Release: 1%{?dist} Summary: Command Line Interface for Apache CloudStack Group: Development/Tools License: ASL 2.0 URL: http://cloudstack.apache.org/ Source0: https://pypi.python.org/packages/source/c/cloudmonkey/%{tarball_name}-%{version}.tar.gz Source1: LICENSE-cloudmonkey Source2: README-cloudmonkey.md BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel Requires: python-pygments Requires: python-argcomplete Requires: python-prettytable Requires: python-requests %description cloudmonkey is a command line interface (CLI) tool for CloudStack written in Python. cloudmonkey can be use both as an interactive shell and as a command line tool which simplifies CS configuration and management. %prep %setup -q LICENSE-cloudmonkey %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} /bin/cp %{SOURCE1} ./LICENSE /bin/cp %{SOURCE2} ./README %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/cloudmonkey %doc LICENSE %doc README %{python_sitelib}/* %changelog * Tue Nov 18 2014 Daniel Bruno - 5.3.0-1 - First RPM Release