python-zope.testrunner/python-zope.testrunner.spec

78 lines
2.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-zope.testrunner
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-zope.testrunner
Version: 4.7.0
Release: 0
Summary: Zope testrunner script
License: ZPL-2.1
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/zope.testrunner
Source: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.zip
BuildRequires: %{python_module setuptools}
# runtime requirements:
BuildRequires: %{python_module six}
BuildRequires: %{python_module zope.exceptions}
BuildRequires: %{python_module zope.interface}
# Test requirements:
BuildRequires: %{python_module zope.testing}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires: python-six
Requires: python-zope.exceptions
Requires: python-zope.interface
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
This package provides a flexible test runner with layer support.
%prep
%setup -q -n zope.testrunner-%{version}
find -size 0 -delete
%build
%python_build
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/zope-testrunner
# Can't seem to be able to run the tests with an uninstalled zope.testrunner
#%%check
#%%python_exec setup.py test
%post
%python_install_alternative zope-testrunner
%postun
%python_uninstall_alternative zope-testrunner
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.rst README.rst
%python_alternative %{_bindir}/zope-testrunner
%{python_sitelib}/*
%changelog