diff --git a/CherryPy-10.2.1.tar.gz b/CherryPy-10.2.1.tar.gz new file mode 100644 index 0000000..07d63d1 --- /dev/null +++ b/CherryPy-10.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee7e514de0167b63233a6bba25dda2bb9d5ef800da8ea3a0282a9a57a382274 +size 688216 diff --git a/CherryPy-3.6.0.tar.gz b/CherryPy-3.6.0.tar.gz deleted file mode 100644 index 8bee406..0000000 --- a/CherryPy-3.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a149271819a15417104aa8f641ad5b96287070f0153e6ef2832a87e2c693d75d -size 432881 diff --git a/python-CherryPy.changes b/python-CherryPy.changes index ea9e0c4..2686ec6 100644 --- a/python-CherryPy.changes +++ b/python-CherryPy.changes @@ -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 diff --git a/python-CherryPy.spec b/python-CherryPy.spec index 868b8d3..3e3da0c 100644 --- a/python-CherryPy.spec +++ b/python-CherryPy.spec @@ -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