File diskimage-builder.spec of Package diskimage-builder

#
# spec file for package diskimage-builder
#
# Copyright (c) 2016 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/
#


# Prevent shebangs of element scripts from being added as a requirement (they
# are only ever run inside the disk image build chroot).
%global         __requires_exclude_from ^%{_datadir}/%{name}/elements/.*$
Name:           diskimage-builder
Version:        1.26.1
Release:        0
Summary:        Image Building Tools for OpenStack
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            https://github.com/openstack/diskimage-builder
Source0:        https://pypi.io/packages/source/d/%{name}/%{name}-%{version}.tar.gz
Source99:       diskimage-builder-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  python-PyYAML
BuildRequires:  python-devel
# Test requirements:
BuildRequires:  python-fixtures
BuildRequires:  python-oslotest
BuildRequires:  python-pbr >= 0.5.10
BuildRequires:  python-setuptools
BuildRequires:  python-testrepository
BuildRequires:  python-testtools
# No stuff in python_sitelib, thus autoreqprov won't work:
Requires:       python-Babel >= 2.3.4
Requires:       python-PyYAML >= 3.1.0
Requires:       python-dib-utils
Requires:       python-six >= 1.9.0
Requires:       qemu-tools
Requires:       python(abi) = %{py_ver}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
These tools are the components of TripleO
(https://wiki.openstack.org/wiki/TripleO) that are responsible for
building disk images.

%prep
%setup -q

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}

%check
if [ ! -d ./.testrepository ] ; then testr init ; fi
testr run %{?_smp_mflags:--parallel %{_smp_flags}} #; RET=$? echo "Slowest Tests" ; testr slowest && exit $RET

%files
%defattr(-,root,root,-)
%doc ChangeLog README.rst LICENSE AUTHORS
%{_bindir}/dib-lint
%{_bindir}/element-info
%{_bindir}/*disk-image-create
%{_datadir}/%{name}
%{python_sitelib}/diskimage_builder/
%{python_sitelib}/diskimage_builder*.egg-info/

%changelog
openSUSE Build Service is sponsored by