forked from pool/python-zope.testrunner
Accepting request 507165 from home:alois:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/507165 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.testrunner?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
06da28c8a9
commit
68e342214d
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-zope.testrunner
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@@ -16,74 +16,63 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-zope.testrunner
|
||||
Version: 4.4.8
|
||||
Version: 4.7.0
|
||||
Release: 0
|
||||
Summary: Zope testrunner script
|
||||
License: ZPL-2.1
|
||||
Group: Development/Languages/Python
|
||||
Url: http://pypi.python.org/pypi/zope.testrunner
|
||||
Source: https://pypi.python.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.zip
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: unzip
|
||||
# Test requirements:
|
||||
#BuildRequires: python-python-subunit
|
||||
#BuildRequires: python-unittest2
|
||||
#BuildRequires: python-zope.testing
|
||||
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 devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
# runtime requirements:
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-zope.exceptions
|
||||
BuildRequires: python-zope.interface
|
||||
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
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%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()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This package provides a flexible test runner with layer support.
|
||||
|
||||
%prep
|
||||
%setup -q -n zope.testrunner-%{version}
|
||||
sed -i "s/zope-testrunner =/zope-testrunner-%{py_ver} =/" setup.py
|
||||
find -size 0 -delete
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# for update-alternatives
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
ln -s %{_sysconfdir}/alternatives/zope-testrunner %{buildroot}%{_bindir}/zope-testrunner
|
||||
# Remove duplicate files
|
||||
%fdupes -s %{buildroot}%{python_sitelib}
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
|
||||
#NOTE(saschpe): Check failing tests
|
||||
%python_clone -a %{buildroot}%{_bindir}/zope-testrunner
|
||||
|
||||
# Can't seem to be able to run the tests with an uninstalled zope.testrunner
|
||||
#%%check
|
||||
#python setup.py test
|
||||
#%%python_exec setup.py test
|
||||
|
||||
%post
|
||||
%_sbindir/update-alternatives --install %{_bindir}/zope-testrunner zope-testrunner %{_bindir}/zope-testrunner-%{py_ver} 20
|
||||
%python_install_alternative zope-testrunner
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
%_sbindir/update-alternatives --remove zope-testrunner %{_bindir}/zope-testrunner-%{py_ver}
|
||||
fi
|
||||
%postun
|
||||
%python_uninstall_alternative zope-testrunner
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.rst README.rst
|
||||
%{_bindir}/zope-testrunner
|
||||
%{_bindir}/zope-testrunner-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/zope-testrunner
|
||||
%python_alternative %{_bindir}/zope-testrunner
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user