From 404cc00ea2aa3f8fd9852fe2412a3f0e7d02f309 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Feb 25 2016 17:22:59 +0000 Subject: Update for newest version 5.0.1, and first of two errors when building for rawhide/f24 (because of python 3.5). Still doesn't build for rawhide. --- diff --git a/.gitignore b/.gitignore index 7133328..f9ff660 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /CherryPy-3.6.0.tar.gz /CherryPy-3.7.0.tar.gz /CherryPy-3.8.0.tar.gz +/CherryPy-5.0.1.tar.gz diff --git a/python-cherrypy-python-3.5-_ast.Call-signature-change.patch b/python-cherrypy-python-3.5-_ast.Call-signature-change.patch new file mode 100644 index 0000000..40d732e --- /dev/null +++ b/python-cherrypy-python-3.5-_ast.Call-signature-change.patch @@ -0,0 +1,67 @@ +From 554f4dcc8c8d54aa1683b15e8fb3d3a6030d6906 Mon Sep 17 00:00:00 2001 +From: Michael Kefeder +Date: Thu, 28 Jan 2016 20:33:04 +0100 +Subject: [PATCH] workaround for issue #1382, python 3.5 _ast.Call signature + rudimentarily implemented + ++ improved workaround for passed **kwargs +--- + cherrypy/lib/reprconf.py | 34 +++++++++++++++++++++++++++++++++- + 1 file changed, 33 insertions(+), 1 deletion(-) + +diff --git a/cherrypy/lib/reprconf.py b/cherrypy/lib/reprconf.py +index 6e70b5e..e394a56 100644 +--- a/cherrypy/lib/reprconf.py ++++ b/cherrypy/lib/reprconf.py +@@ -287,7 +287,7 @@ class _Builder2: + key, value_obj = o.getChildren() + value = self.build(value_obj) + kw_dict = {key: value} +- return kw_dict ++ return kw_dict + + def build_List(self, o): + return map(self.build, o.getChildren()) +@@ -377,7 +377,39 @@ class _Builder3: + def build_Index(self, o): + return self.build(o.value) + ++ def build_Call35(self, o): ++ """workaround for python 3.5 _ast.Call signature, docs found here ++ https://greentreesnakes.readthedocs.org/en/latest/nodes.html""" ++ callee = self.build(o.func) ++ ++ args = () ++ kwargs = dict() ++ if o.args is not None: ++ import _ast ++ args = [] ++ for a in o.args: ++ if _ast.Starred is not type(a): ++ args.append(self.build(a)) ++ else: ++ args.append(self.build(a.value)) ++ args = tuple(args) ++ ++ for a in o.keywords: ++ if a.arg: ++ kwargs[a.arg] = self.build(a.value) ++ else: ++ if _ast.Dict is type(a.value): ++ for k, v in zip(a.value.keys, a.value.values): ++ kwargs[self.build(k)] = self.build(v) ++ else: ++ kwargs[a.value.id] = self.build(a.value) ++ ++ return callee(*(args), **kwargs) ++ + def build_Call(self, o): ++ if sys.version_info >= (3, 5): ++ return self.build_Call35(o) ++ + callee = self.build(o.func) + + if o.args is None: +-- +2.5.0 + diff --git a/python3-cherrypy.spec b/python3-cherrypy.spec index 16ea901..4be3634 100644 --- a/python3-cherrypy.spec +++ b/python3-cherrypy.spec @@ -1,18 +1,20 @@ Name: python3-cherrypy %global camelname CherryPy -Version: 3.8.0 -Release: 3%{?dist} +Version: 5.0.1 +Release: 1%{?dist} Summary: Pythonic, object-oriented web development framework Group: Development/Libraries License: BSD URL: http://www.cherrypy.org/ Source0: https://pypi.python.org/packages/source/C/%{camelname}/%{camelname}-%{version}.tar.gz Patch0: python-cherrypy-tutorial-doc.patch +Patch1: python-cherrypy-python-3.5-_ast.Call-signature-change.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-setuptools +BuildRequires: python3-mock BuildRequires: dos2unix # Delete pycache in %%doc after %%install @@ -26,6 +28,7 @@ results in smaller source code developed in less time. %prep %setup -q -n %{camelname}-%{version} %patch0 -p1 +%patch1 -p1 dos2unix README.txt cherrypy/LICENSE.txt cherrypy/tutorial/README.txt cherrypy/tutorial/tutorial.conf @@ -58,13 +61,20 @@ cd - rm -rf cherrypy/tutorial/__pycache__ %files +%license cherrypy/LICENSE.txt %doc README.txt %doc cherrypy/tutorial -%doc cherrypy/LICENSE.txt %{_bindir}/python3-cherryd %{python3_sitelib}/* %changelog +* Thu Feb 25 2016 Tomas Orsava - 5.0.1-1 +- Updated to a new version +- Added one new build dependency +- Included a patch for the first of two test errors when building for rawhide + (caused by changes in python 3.5) based on an upstream pull request: + https://bitbucket.org/cherrypy/cherrypy/pull-requests/120/workaround-for-issue-1382-python-35 + * Thu Feb 04 2016 Fedora Release Engineering - 3.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 1d3d97c..ef95b3d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -542b96b2cd825e8120e8cd822bc18f4b CherryPy-3.8.0.tar.gz +4a475ff1e2a580d29aa3ab8bb98268a6 CherryPy-5.0.1.tar.gz