File python-pockets.spec of Package python-pockets
#
# spec file for package python-pockets
#
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
#
# 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 use_build_checks 1
Name: python-pockets
Version: 0.3
Release: 0
License: BSD-2-Clause
Summary: A collection of helpful Python tools
Url: https://github.com/RobRuana/pockets
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/p/pockets/pockets-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
%if 0%{?use_build_checks}
BuildRequires: python-nose
BuildRequires: python-six
%endif
Requires: python-six
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
The Pockets library pulls together lots of Python helper functions.
%prep
%setup -q -n pockets-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# remove unneeded files
rm -rf %{buildroot}%{python_sitelib}/tests
%check
%if 0%{?use_build_checks}
nosetests
%endif
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE README.rst
%{python_sitelib}/pockets
%{python_sitelib}/pockets-%{version}-py%{py_ver}.egg-info
%changelog