File euca2ools.spec of Package euca2ools

# spec file for package euca2ools
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           euca2ools
Version:        3.0.4
Release:        0
Summary:        Elastic Utility Computing Architecture Command Line Tools
License:        BSD-2-Clause
Group:          Productivity/Networking/System
Source0:        %{name}-%{version}.tar.gz
Source1:        euca2ools-rpmlintrc
BuildRequires:  help2man
BuildRequires:  make
BuildRequires:  python-boto   >= 2.1
BuildRequires:  python-devel
BuildRequires:  python-m2crypto
BuildRequires:  python-xml
BuildRequires:	python-distribute
Requires:       python-base  >= 2.6
Requires:       python-boto  >= 2.1
Requires:       python-m2crypto
Requires:		python-requests
Requires:		python-six
Requires:		python-requestbuilder
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Euca2ools are command-line tools for interacting with Web services that
export a REST/Query-based API compatible with Amazon EC2 and S3 services.
The tools can be used with both Amazon's services and with installations
of the Eucalyptus open-source cloud-computing infrastructure.

%setup -q

python build
sh -xe

python install --prefix=%{_prefix} --skip-build --root %{buildroot}
python install -O1 --prefix=%{_prefix} --skip-build --root %{buildroot}
find "%{buildroot}%{python_sitelib}/" -name '*.pyo' -exec %__rm {} \;
find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \
    -exec %__rm {} \;
%__python -c 'import compileall;
export DESTDIR=%{buildroot}
export PREFIX=%{_prefix}
mkdir -p %{buildroot}/etc/euca2ools
cp conf/euca2ools.ini %{buildroot}/etc/euca2ools/
#sh -xe

%doc %{_mandir}/man1/*

openSUSE Build Service is sponsored by