14
0

- Update to 18.1.0:

* too many changes to iterate, see CHANGES.rst
  * Dropped support for python2
- Make sure tests are run

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=23
This commit is contained in:
Tomáš Chvátal
2019-03-05 14:33:48 +00:00
committed by Git OBS Bridge
parent 7131bed871
commit c49c2fa23d
4 changed files with 40 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-CherryPy
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@@ -12,57 +12,46 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# transient tests failures for PowerPC and x86_64
%bcond_with tests
%bcond_without python2
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-CherryPy
Version: 10.2.1
Version: 18.1.0
Release: 0
Url: http://www.cherrypy.org
Summary: Object-Oriented HTTP framework
License: BSD-3-Clause
Group: Development/Languages/Python
URL: http://www.cherrypy.org
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
# SECTION test requirements
BuildRequires: %{python_module cheroot >= 5.2.0}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module portend >= 1.6.1}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
%if %{with python2}
BuildRequires: python2-backports.unittest_mock
%endif
# /SECTION
BuildRequires: python-rpm-macros
Requires: python-cheroot >= 6.2.4
Requires: python-more-itertools
Requires: python-portend >= 2.1.1
Requires: python-zc.lockfile
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: python-cheroot >= 5.2.0
Requires: python-portend >= 1.6.1
Requires: python-six
Recommends: python-simplejson
Recommends: python-Routes
Recommends: python-pyOpenSSL
Recommends: python-memcached >= 1.58
Recommends: python-Routes >= 2.3.1
Recommends: python-flup
Recommends: python-memcached >= 1.58
Recommends: python-pyOpenSSL
Recommends: python-simplejson
BuildArch: noarch
%ifpython2
Provides: %{oldpython}-cherrypy = %{version}
Obsoletes: %{oldpython}-cherrypy < %{version}
%endif
# SECTION test requirements
BuildRequires: %{python_module cheroot >= 6.2.4}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module path.py}
BuildRequires: %{python_module portend >= 2.1.1}
BuildRequires: %{python_module pytest-services}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests-toolbelt}
BuildRequires: %{python_module zc.lockfile}
# /SECTION
%python_subpackages
%description
@@ -80,21 +69,19 @@ Oh, and most importantly: CherryPy is fun to work with :-)
%prep
%setup -q -n CherryPy-%{version}
# do not require cov/xdist/etc
sed -i -e '/addopts/d' pytest.ini
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/cherryd
%fdupes %{buildroot}%{_prefix}
%check
%if %{with tests}
%python_exec -m pytest cherrypy/test
%else
echo "transient test failures so disable pytest."
%endif
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v
%post
%python_install_alternative cherryd
@@ -103,8 +90,8 @@ echo "transient test failures so disable pytest."
%python_uninstall_alternative cherryd
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENSE.md CHANGES.rst
%license LICENSE.md
%doc README.rst CHANGES.rst
%python_alternative %{_bindir}/cherryd
%{python_sitelib}/cherrypy/
%{python_sitelib}/CherryPy-%{version}-py%{python_version}.egg-info