2013-01-14 13:20:27 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-extras
|
|
|
|
#
|
2017-04-03 06:30:45 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-01-14 13:20:27 +00:00
|
|
|
#
|
|
|
|
# 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/
|
2013-04-29 13:25:43 +00:00
|
|
|
#
|
2013-01-14 13:20:27 +00:00
|
|
|
|
|
|
|
|
2014-03-07 11:01:44 +00:00
|
|
|
# A build cycle exists between python-extras and python-testtools. Thus, only
|
|
|
|
# enable testing with a build conditional (off by default):
|
|
|
|
%bcond_with tests
|
|
|
|
|
2017-04-03 06:30:45 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-01-14 13:20:27 +00:00
|
|
|
Name: python-extras
|
2016-08-30 11:58:52 +00:00
|
|
|
Version: 1.0.0
|
2013-01-14 13:20:27 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Useful extra bits for Python
|
2013-04-29 13:25:43 +00:00
|
|
|
License: MIT
|
2013-01-14 13:20:27 +00:00
|
|
|
Group: Development/Languages/Python
|
2013-04-29 13:25:43 +00:00
|
|
|
Url: https://github.com/testing-cabal/extras
|
2016-08-31 08:25:36 +00:00
|
|
|
Source: https://pypi.io/packages/source/e/extras/extras-%{version}.tar.gz
|
2017-04-03 06:30:45 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2013-05-03 08:15:08 +00:00
|
|
|
# Test requirements:
|
2014-03-07 11:01:44 +00:00
|
|
|
%if %{with tests}
|
2017-04-03 06:30:45 +00:00
|
|
|
BuildRequires: %{python_module nose}
|
|
|
|
BuildRequires: %{python_module testtools}
|
2014-03-07 11:01:44 +00:00
|
|
|
%endif
|
2017-04-03 06:30:45 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
# Break cycle
|
|
|
|
#!BuildIgnore: python-extras
|
2013-01-14 13:20:27 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2017-04-03 06:30:45 +00:00
|
|
|
%python_subpackages
|
2013-01-14 13:20:27 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
extras is a set of extensions to the Python standard library, originally
|
|
|
|
written to make the code within testtools cleaner, but now split out for
|
|
|
|
general use outside of a testing context.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n extras-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-04-03 06:30:45 +00:00
|
|
|
%python_build
|
2013-01-14 13:20:27 +00:00
|
|
|
|
|
|
|
%install
|
2017-04-03 06:30:45 +00:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
2013-01-14 13:20:27 +00:00
|
|
|
|
2014-03-07 11:01:44 +00:00
|
|
|
%if %{with tests}
|
2013-01-14 13:22:47 +00:00
|
|
|
%check
|
2017-04-03 06:30:45 +00:00
|
|
|
%python_exec %{_bindir}/nosetests
|
2014-03-07 11:01:44 +00:00
|
|
|
%endif
|
2013-01-14 13:22:47 +00:00
|
|
|
|
2017-04-03 06:30:45 +00:00
|
|
|
%files %{python_files}
|
2013-01-14 13:20:27 +00:00
|
|
|
%defattr(-,root,root,-)
|
2013-01-14 13:22:47 +00:00
|
|
|
%doc LICENSE NEWS README.rst
|
2013-05-03 08:15:08 +00:00
|
|
|
%{python_sitelib}/extras
|
2017-04-03 06:30:45 +00:00
|
|
|
%{python_sitelib}/extras-%{version}-py%{python_version}.egg-info/
|
2013-01-14 13:20:27 +00:00
|
|
|
|
|
|
|
%changelog
|