File python-swift3.spec of Package python-swift3

#
# spec file for package python-swift3
#
# Copyright (c) 2015 SUSE LINUX 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 http://bugs.opensuse.org/
#


%define component swift3

Name:           python-swift3
Version:        1.8.0.dev388
Release:        0
Summary:        OpenStack Swift - Amazon S3 API Middleware
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            https://github.com/stackforge/swift3
Source:         http://tarballs.openstack.org/swift3/swift3-master.tar.gz
BuildRequires:  fdupes
BuildRequires:  openstack-suse-macros
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
# Documentation requirements:
BuildRequires:  python-Sphinx
Requires:       python-lxml
Requires:       python-swift >= 2.1.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%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
Swift3 Middleware for OpenStack Swift, allowing access to OpenStack swift via the Amazon S3 API.

%package test
Summary:        OpenStack Swift - Amazon S3 API Middleware - Testsuite
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       python-boto
Requires:       python-mock
Requires:       python-openstack.nose_plugin
Requires:       python-openstackclient

%description test
The Swift3 Middleware testsuite. It is used to verify the functionality
of the Swift3 Middleware for OpenStack Swift.

%prep
%setup -q -n swift3-%{version}
%openstack_cleanup_prep

%build
python setup.py build
python setup.py build_sphinx

%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}

### test subpackage
%openstack_test_package_install
%fdupes %{buildroot}%{_localstatedir}/lib/%{name}-test

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.md build/sphinx/html
%{python_sitelib}/%{component}/
%{python_sitelib}/%{component}-*.egg-info
%exclude %{python_sitelib}/%{component}/test*

%files test
%defattr(-,root,root)
%{_localstatedir}/lib/%{name}-test/
%{python_sitelib}/%{component}/test*

%changelog
openSUSE Build Service is sponsored by