14
0

Accepting request 486191 from devel:languages:python:singlespec

- update for singlespec
- update to version 10.2.1
  * too many changes to list
- add many new requirements and recommends

OBS-URL: https://build.opensuse.org/request/show/486191
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=17
This commit is contained in:
Jan Matejek
2017-04-06 15:50:20 +00:00
committed by Git OBS Bridge
parent 689f4a83c7
commit f2d40e0308
4 changed files with 54 additions and 32 deletions

3
CherryPy-10.2.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ee7e514de0167b63233a6bba25dda2bb9d5ef800da8ea3a0282a9a57a382274
size 688216

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a149271819a15417104aa8f641ad5b96287070f0153e6ef2832a87e2c693d75d
size 432881

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Mar 31 15:30:01 UTC 2017 - jmatejek@suse.com
- update for singlespec
- update to version 10.2.1
* too many changes to list
- add many new requirements and recommends
-------------------------------------------------------------------
Sun Feb 22 17:22:27 UTC 2015 - benoit.monin@gmx.fr

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-CherryPy
#
# 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,25 +16,47 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-CherryPy
Version: 3.6.0
Version: 10.2.1
Release: 0
Url: http://www.cherrypy.org
Summary: Object-Oriented HTTP framework
License: BSD-3-Clause
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
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}
BuildRequires: python2-backports.unittest_mock
# /SECTION
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
%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
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-flup
BuildArch: noarch
%ifpython2
Provides: %{oldpython}-cherrypy = %{version}
Obsoletes: %{oldpython}-cherrypy < %{version}
%endif
Provides: python-cherrypy = %{version}
Obsoletes: python-cherrypy < %{version}
%python_subpackages
%description
CherryPy is a pythonic, object-oriented HTTP framework.
@@ -53,35 +75,27 @@ Oh, and most importantly: CherryPy is fun to work with :-)
%setup -q -n CherryPy-%{version}
%build
python setup.py build
%python_build
%install
sed -i 's|\r||' README.txt # Fix wrong EOL encoding
find . -name sessiondemo.py -type f -exec chmod 0755 {} \; # Fix non-executable bit rpmlint warning
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_clone -a %{buildroot}%{_bindir}/cherryd
%fdupes %{buildroot}%{_prefix}
# update-alternatives
mv %{buildroot}%{_bindir}/cherryd %{buildroot}%{_bindir}/cherryd-%{py_ver}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/cherryd
ln -sf %{_sysconfdir}/alternatives/cherryd %{buildroot}%{_bindir}/cherryd
%check
%python_exec -m pytest cherrypy/test
%post
update-alternatives \
--install %{_bindir}/cherryd cherryd %{_bindir}/cherryd-%{py_ver} 20
%python_install_alternative cherryd
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove cherryd %{_bindir}/cherryd-%{py_ver}
fi
%python_uninstall_alternative cherryd
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc README.txt
%ghost %{_sysconfdir}/alternatives/cherryd
%{_bindir}/cherryd
%{_bindir}/cherryd-%{py_ver}
%doc README.rst LICENSE.md CHANGES.rst
%python_alternative %{_bindir}/cherryd
%{python_sitelib}/cherrypy/
%{python_sitelib}/CherryPy-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/CherryPy-%{version}-py%{python_version}.egg-info
%changelog