File python-dib-utils.spec of Package python-dib-utils

#
# spec file for package python-dib-utils
#
# 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/
#


%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()")}
%endif
Name:           python-dib-utils
Version:        0.0.11
Release:        0
Summary:        Pieces of diskimage-builder that are useful without the rest of the project
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            https://git.openstack.org/cgit/openstack/dib-utils
Source:         https://pypi.io/packages/source/d/dib-utils/dib-utils-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       awk
# No stuff in python_sitelib, thus autoreqprov won't work:
Requires:       python(abi) = %{py_ver}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
These tools were originally part of the diskimage-builder project, but they have
uses outside of that project as well.  Because disk space is at a premium in
base cloud images, pulling in all of diskimage-builder and its dependencies just to
use something like dib-run-parts is not desirable.  This project allows consumers
to use the tools while pulling in only one small package with few/no additional
dependencies.

%prep
%setup -q -n dib-utils-%{version}

%build
%{__python2} setup.py build

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

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog README.md
%{_bindir}/dib-run-parts
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by