#17 Avoid requiring python3.10dist cheroot
Closed 2 years ago by churchyard. Opened 2 years ago by jcapitao.
rpms/ jcapitao/python-cherrypy rawhide  into  rawhide

@@ -0,0 +1,24 @@ 

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

+ From: Joel Capitao <jcapitao@redhat.com>

+ Date: Fri, 28 Jan 2022 10:06:29 +0100

+ Subject: [PATCH] Remove cheroot dep from setup.py

+ 

+ ---

+  setup.py | 1 -

+  1 file changed, 1 deletion(-)

+ 

+ diff --git a/setup.py b/setup.py

+ index c617526c..07e44cd6 100644

+ --- a/setup.py

+ +++ b/setup.py

+ @@ -61,7 +61,6 @@ params = dict(

+      entry_points={'console_scripts': ['cherryd = cherrypy.__main__:run']},

+      include_package_data=True,

+      install_requires=[

+ -        'cheroot>=8.2.1',

+          'portend>=2.1.1',

+          'more_itertools',

+          'zc.lockfile',

+ -- 

+ 2.32.0

+ 

file modified
+7 -1
@@ -10,7 +10,7 @@ 

  Name:           python-cherrypy

  %global         camelname CherryPy

  Version:        18.6.1

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Pythonic, object-oriented web development framework

  License:        BSD

  URL:            https://cherrypy.dev/
@@ -19,6 +19,7 @@ 

  # Ignore thread-related DeprecationWarnings new in Python 3.10

  # Temporary workaround for https://github.com/cherrypy/cherrypy/issues/1914

  Patch1:         pytest-ignore-thread-DeprecationWarnings.patch

+ Patch2:         0002-Remove-cheroot-dep-from-setup.py.patch

  

  BuildArch:      noarch

  
@@ -53,6 +54,8 @@ 

  Summary: %summary

  %{?python_provide:%python_provide python3-cherrypy}

  

+ Requires:  python3-cheroot >= 8.2.1

+ 

  # Remove after F32.

  Obsoletes: python2-cherrypy < 3.5.1

  
@@ -93,6 +96,9 @@ 

  %exclude %{python3_sitelib}/cherrypy/tutorial

  

  %changelog

+ * Fri Jan 28 2022 Joel Capitao <jcapitao@redhat.com> - 18.6.1-3

+ - Add explicit cheroot requires

+ 

  * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 18.6.1-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

  

Upstream cheroot software has a packaging issue leading
to a .egg-info equals to 0.0.0 (i.e cheroot-0.0.0-py3.10.egg-info/*)
So an automatic Provides is added as "python3.10dist(cheroot) = 0" [1] for
python-chroot.

The automatic Requires which parses the conf.py adds the
python3.10dist(cheroot) >= 8.2.1 but as we have 0, we're
hitting the issue "nothing provides python3.10dist(cheroot) >= 8.2.1"
when using python-cherrypy.

So we remove the automatic requires and add explicit requires for
cheroot as python3-cheroot w/o use of dist.

[1] rpm -q --provides https://kojipkgs.fedoraproject.org//packages/python-cheroot/8.6.0/3.fc36/noarch/python3-cheroot-8.6.0-3.fc36.noarch.rpm

Build succeeded.

+1, I've verified that it also fixes broken python-CacheControl.

I don't agree this is the proper place to fix this. cheroot needs to be fixed instead.

Pull-Request has been closed by churchyard

2 years ago

Thanks @churchyard for the heads up. I didn't go up to the source :)