Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1757463 - flake8 fails on epel8 due to missing dependency on mccabe and entrypoints
Summary: flake8 fails on epel8 due to missing dependency on mccabe and entrypoints
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-flake8
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Troy Dawson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1774260
Blocks: 1757320 1774038
TreeView+ depends on / blocked
 
Reported: 2019-10-01 15:32 UTC by Sandro Bonazzola
Modified: 2019-12-11 01:59 UTC (History)
7 users (show)

Fixed In Version: python-flake8-3.7.7-5.fc31 python-flake8-3.7.7-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-11 01:59:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sandro Bonazzola 2019-10-01 15:32:04 UTC
Description of problem:
Despite python-mccabe-0.6.1-11.el8 is available in epel8 according to https://koji.fedoraproject.org/koji/buildinfo?buildID=1319583
Running flake8 fails with:

Traceback (most recent call last):
  File "/usr/bin/flake8", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mccabe<0.7.0,>=0.6.0' distribution was not found and is required by flake8

Version-Release number of selected component (if applicable):
python-flake8-3.7.7-1.el8.1

How reproducible:
100%

Looks like a dependency missing https://koji.fedoraproject.org/koji/rpminfo?rpmID=18203479
doesn't show python3-mccabe as requirement

Comment 1 Sandro Bonazzola 2019-10-01 15:34:26 UTC
flake8 needed in an ovirt package build: https://gerrit.ovirt.org/#/c/103726/

Comment 2 Matthias Runge 2019-10-02 06:31:26 UTC
I don't do epel builds for a long time now, and I'd like to keep it that way.

I see https://src.fedoraproject.org/rpms/python-flake8/c/aa80b5f09c9aaf77a95c7b7f7cb81c368636af7b?branch=master
which dropped the deps even on rawhide. I'll the package in Fedora though.

Comment 3 Fedora Update System 2019-10-02 06:31:54 UTC
FEDORA-2019-67474a7206 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-67474a7206

Comment 4 Fedora Update System 2019-10-02 06:39:32 UTC
FEDORA-EPEL-2019-2c080a59a6 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-2c080a59a6

Comment 5 Fedora Update System 2019-10-03 03:19:39 UTC
python-flake8-3.7.7-5.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-67474a7206

Comment 6 Fedora Update System 2019-10-03 03:58:20 UTC
python-flake8-3.7.7-5.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-2c080a59a6

Comment 7 Sandro Bonazzola 2019-10-07 14:24:42 UTC
Sorry, now failing on
[2019-10-07T13:26:12.364Z] Traceback (most recent call last):

[2019-10-07T13:26:12.365Z]   File "/usr/bin/flake8", line 6, in <module>

[2019-10-07T13:26:12.365Z]     from pkg_resources import load_entry_point

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module>

[2019-10-07T13:26:12.365Z]     @_call_aside

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside

[2019-10-07T13:26:12.365Z]     f(*args, **kwargs)

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set

[2019-10-07T13:26:12.365Z]     working_set = WorkingSet._build_master()

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master

[2019-10-07T13:26:12.365Z]     ws.require(__requires__)

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require

[2019-10-07T13:26:12.365Z]     needed = self.resolve(parse_requirements(requirements))

[2019-10-07T13:26:12.365Z]   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve

[2019-10-07T13:26:12.365Z]     raise DistributionNotFound(req, requirers)

[2019-10-07T13:26:12.365Z] pkg_resources.DistributionNotFound: The 'entrypoints<0.4.0,>=0.3' distribution was not found and is required by flake8

Comment 8 Matthias Runge 2019-10-09 08:45:40 UTC
That should be available. https://koji.fedoraproject.org/koji/buildinfo?buildID=1319570

Let me repeat: I do not support EPEL, I don't do EPEL builds.

Comment 9 Sandro Bonazzola 2019-10-09 15:22:14 UTC
(In reply to Matthias Runge from comment #8)
> That should be available.
> https://koji.fedoraproject.org/koji/buildinfo?buildID=1319570
> 
> Let me repeat: I do not support EPEL, I don't do EPEL builds.

who's the maintainer of epel builds?

Comment 10 Sandro Bonazzola 2019-10-14 11:23:12 UTC
moving to tdawson

Comment 11 Troy Dawson 2019-10-14 13:40:30 UTC
So, it looks like the python dependency generator, that runs during a python package build, didn't, or doesn't happen on EPEL8, as opposed to Rawhide.
This is going to require discussion and possibly a long term fix, not for just this package.

After Matthias's update to the package, it looks like the only dependency still not manually added is python3-entrypoints.

In the mean time, try installing python3-entrypoints and see if it runs properly for you.

Comment 12 Sandro Bonazzola 2019-10-21 08:15:06 UTC
(In reply to Troy Dawson from comment #11)

> In the mean time, try installing python3-entrypoints and see if it runs
> properly for you.

Yes, once python3-entrypoints is installed it works for me.

Comment 13 Fedora Update System 2019-10-26 17:21:22 UTC
python-flake8-3.7.7-5.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Ken Dreyer (Red Hat) 2019-11-12 17:59:24 UTC
Bodhi closed this bug in a Fedora update, and I think that was a mistake. Re-opening.

Troy do you have any link to a EPEL discussion about the Python dependency generator?

Comment 15 Troy Dawson 2019-11-12 20:21:07 UTC
Python Generators were enabled by default in Fedora 30, on 2019/12/7.  (or around that time)
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/5CFYGHOBMSIIUQX5QBCPC4R6NE42G5OE/

There is some discussion about how that will affect EPEL builds here
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/WD6NYJWHRUZHRRTUJEMCYDZ3NXOWVVWH/

I have just verified that EPEL8 builds do *not* get python-rpm-generators installed, and thus do not do automatic python dependency generation.

python-rpm-generators is now available for both RHEL8 and RHEL7 (as of RHEL 7.7).
I think this is something we should bring up with the EPEL committee, see if we want to enable it by default for at least EPEL8, and possibly EPEL7.

Comment 16 Troy Dawson 2019-11-12 20:22:01 UTC
Fedora change proposal is here
https://fedoraproject.org/wiki/Changes/EnablingPythonGeneratorsByDefault

Comment 17 Troy Dawson 2019-11-12 20:36:19 UTC
Issue has been proposed to EPEL
https://pagure.io/epel/issue/94

Comment 18 Ken Dreyer (Red Hat) 2019-11-13 16:41:33 UTC
Thank you Troy!

Comment 19 Troy Dawson 2019-11-19 17:57:03 UTC
So, looking at this bug some more, I found that python dependency generator was indeed installed for the epel8 builds.  And that it is indeed enabled for RHEL8.

python2-devel requires python3-rpm-generators (yep, that's right)
platform-python-devel requires python3-rpm-generators
and python36-devel requires platform-python-devel.

But RHEL8 has an older version than in Fedora.
I am investigating further to see why these similar builds didn't get the same dependencies generated.

Comment 20 Troy Dawson 2019-11-19 22:25:27 UTC
Bug open for RHEL's python-rpm-generators

Comment 21 Troy Dawson 2019-11-20 23:07:20 UTC
According to the bug, it looks like RHEL8 isn't going to change.
After discussion at our last EPEL meeting, it was decided to put this into epel-rpm-macros.
After various testing, it looks like we just need to add /usr/lib/rpm/fileattrs/pythondist.attr to epel-rpm-macros.
This file doesn't conflict with anything, because it is missing in the RHEL8 python3-rpm-generators.
An updated epel-rpm-macros, with this change in it, is available in epel8-playground. After a day or two of testing there, we will move it to the regular epel8.

Summary: We're getting close to having this fixed.

Comment 22 Daniel Berrangé 2019-12-09 17:51:01 UTC
If I'm interpreting the linked EPEL issues, the neccessary update (https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-92c30fbb1e) has finally hit stable a few days ago. Can we get flake8 rebuilt now to pick up the missing deps ?

Comment 23 Troy Dawson 2019-12-09 20:40:35 UTC
Will do

Comment 24 Fedora Update System 2019-12-09 21:19:22 UTC
FEDORA-EPEL-2019-c30b64dc67 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-c30b64dc67

Comment 25 Fedora Update System 2019-12-10 19:14:08 UTC
python-flake8-3.7.7-6.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-c30b64dc67

Comment 26 Fedora Update System 2019-12-11 01:59:05 UTC
python-flake8-3.7.7-6.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.