#7 Update EPEL8 branch
Merged 2 months ago by radez. Opened 2 months ago by jcaratzas.
rpms/ jcaratzas/python-cherrypy epel8  into  epel8

file added
+42

@@ -0,0 +1,42 @@ 

+ From e2cc6f4ab6baf45d3ca19295759f01af98dd2ab2 Mon Sep 17 00:00:00 2001

+ From: Alfredo Deza <adeza@redhat.com>

+ Date: Wed, 20 Nov 2019 18:01:36 -0500

+ Subject: [PATCH] use pytest 3.4 compatible fixtures for tmp paths

+ 

+ The latest version of pytest in EPEL8 is 3.4.2 which is missing the

+ fixtures used by CherryPy.

+ 

+ Upstream issue: https://github.com/cherrypy/cherrypy/issues/1824

+ ---

+  cherrypy/test/test_logging.py | 12 ++++++++----

+  1 file changed, 8 insertions(+), 4 deletions(-)

+ 

+ diff --git a/cherrypy/test/test_logging.py b/cherrypy/test/test_logging.py

+ index 5308fb72..87f48d13 100644

+ --- a/cherrypy/test/test_logging.py

+ +++ b/cherrypy/test/test_logging.py

+ @@ -16,13 +16,17 @@ erebos = u'\u0388\u03c1\u03b5\u03b2\u03bf\u03c2.com'

+  

+  

+  @pytest.fixture

+ -def access_log_file(tmp_path_factory):

+ -    return tmp_path_factory.mktemp('logs') / 'access.log'

+ +def access_log_file(tmpdir):

+ +    p = tmpdir.mkdir("access_logs").join("access.log")

+ +    p.write("")

+ +    return p

+  

+  

+  @pytest.fixture

+ -def error_log_file(tmp_path_factory):

+ -    return tmp_path_factory.mktemp('logs') / 'access.log'

+ +def error_log_file(tmpdir):

+ +    p = tmpdir.mkdir("error_logs").join("error.log")

+ +    p.write("")

+ +    return p

+  

+  

+  @pytest.fixture

+ -- 

+ 2.20.1

+ 

file added
+2

@@ -0,0 +1,2 @@ 

+ [koji]

+ targets = epel8 epel8-playground 

\ No newline at end of file

file modified
+8

@@ -1,6 +1,7 @@ 

  # This package depends on automagic byte compilation

  # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2

  %global _python_bytecompile_extra 1

+ %{?python_enable_dependency_generator}

  

  Name:           python-cherrypy

  %global         camelname CherryPy

@@ -14,6 +15,11 @@ 

  # Don't ship the tests or tutorials in the python module directroy,

  # tutorial will be shipped as doc instead

  

+ # https://github.com/cherrypy/cherrypy/issues/1824

+ # Do not use newer pytest fixtures that aren't part of pytest 3.4.2 - this can be

+ # removed once 3.9.1 (or newer) is packaged.

+ Patch0:         0001.patch

+ 

  BuildArch:      noarch

  

  obsoletes: python2-cherrypy < 3.5.1

@@ -31,6 +37,7 @@ 

  BuildRequires:  python3dist(pytest)

  BuildRequires:  python3dist(pytest-cov)

  BuildRequires:  python3dist(requests-toolbelt)

+ BuildRequires:  python3dist(more-itertools)

  BuildRequires:  python3dist(coverage)

  BuildRequires:  python3dist(pytest)

  BuildRequires:  python3-zc-lockfile

@@ -50,6 +57,7 @@ 

  

  %prep

  %setup -q -n %{camelname}-%{version}

+ %patch0 -p1

  

  dos2unix cherrypy/tutorial/tutorial.conf

  

The work in master builds correctly for EPEL8. I am also kindly requesting permission to this repo so that I can push directly to the EPEL8 branch in the future and help maintain this package.

The following build in Copr succeeded for EPEL8 with the merged changes: https://copr.fedorainfracloud.org/coprs/ktdreyer/ceph-el8/build/1118292/

Pull-Request has been merged by radez

2 months ago