Bug 1739776 - fypp fails to run because python-rpm-generators doesn't detect runtime dependency on setuptools
Summary: fypp fails to run because python-rpm-generators doesn't detect runtime depend...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpm-generators
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-10 11:39 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2019-10-29 14:20 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-29 14:20:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2019-08-10 11:39:04 UTC
Description of problem:
fypp (python3-fypp) fails to run on F30 because python3 in F30 (and only there) doesn't pull setuptools. Is this on purpose?

Version-Release number of selected component (if applicable):
python3-3.7.4-1.fc30
python3-fypp-2.1.1-6.fc30.noarch

How reproducible:
Always

Steps to Reproduce:
1. mock -r fedora-30-x86_64 clean
2. mock -r fedora-30-x86_64 install python3-fypp
3. mock -r fedora-30-x86_64 shell
4. fypp --version

Actual results:
Traceback (most recent call last):
  File "/usr/bin/fypp", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

Expected results:
fypp 2.1.1

Additional info:
This works on F29 and F31 because python3 pulls in setuptools there.

Comment 1 Lumír Balhar 2019-08-10 12:09:02 UTC
We figure it out together. /usr/bin/fypp is generated as an entry point by setuptools and therefore needs setuptools to run, and setuptools is not required by python3 in Fedora 30+ anymore (just recommended).

So, python3-fypp should require python3-setuptools.

Comment 2 Dominik 'Rathann' Mierzejewski 2019-08-10 12:36:34 UTC
Ok, so it looks like the setuptools runtime dependency should be automatically generated and it does get generated if I simply rebuild the package on F30+. So the real bug was in python-rpm-generators-7 and older which was in the buildroot at the time the F30 fypp package was built. python-rpm-generators-8 from F30 updates contains a fix, which explains why it works in F30 if I rebuild it now.

Comment 3 Dominik 'Rathann' Mierzejewski 2019-08-10 12:41:01 UTC
On second thought, I'm moving this to F29 python-rpm-generators, where this is still broken. It's fixed in F30 updates, so it's a matter of backporting to F29 and rebuilding the affected packages.

Comment 4 Miro Hrončok 2019-08-10 13:25:17 UTC
This was always the case - if you have entrypoints, you need to add setuptools dep.

In Fedora 30, this was enhanced: you no longer have to do that. But it was not considered for backport, because I've considered it enhancement, not bugfix.


If you really want this, could you open a PR that cherry-picks this commit?

https://src.fedoraproject.org/rpms/python-rpm-generators/c/70b3ebc993c45c82c5f84868a10634e4dd156280?branch=master

Comment 5 Fedora Update System 2019-08-10 13:57:46 UTC
FEDORA-2019-6b4d7f39bf has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6b4d7f39bf

Comment 6 Dominik 'Rathann' Mierzejewski 2019-08-10 14:23:59 UTC
(In reply to Miro Hrončok from comment #4)
> This was always the case - if you have entrypoints, you need to add
> setuptools dep.

Well, I had no idea about entrypoints and the need to specify setuptools dep
manually. It worked for me by accident, because setuptools was always pulled
in by something until F30.

I suspect there might be other maintainers who are affected.

> In Fedora 30, this was enhanced: you no longer have to do that. But it was
> not considered for backport, because I've considered it enhancement, not
> bugfix.

I'd consider that a bugfix. An undetected runtime dependency is a bug, isn't it?

> If you really want this, could you open a PR that cherry-picks this commit?
> 
> https://src.fedoraproject.org/rpms/python-rpm-generators/c/
> 70b3ebc993c45c82c5f84868a10634e4dd156280?branch=master

Sorry, I don't have that much time. I did the manual workaround in F29 branch
for fypp.

Comment 7 Miro Hrončok 2019-08-10 19:17:32 UTC
> I'd consider that a bugfix. An undetected runtime dependency is a bug, isn't it?

Possibly. Will do my best to get back to this.

Comment 8 Fedora Update System 2019-08-11 01:23:01 UTC
python-fypp-2.1.1-6.fc29 has been pushed to the Fedora 29 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-6b4d7f39bf

Comment 9 Petr Viktorin 2019-08-11 08:40:30 UTC
Hmm, this looks like an issue in setuptools or wheel. If there's a setuptools-based entrypoint, setuptools should be included in the dist metadata.

Comment 10 Miro Hrončok 2019-08-11 08:54:17 UTC
I've always assumed the following upstream:

If you pip install packages, you have setuptools. setuptools and pip are not part of pip freeze output etc. and are simply assumed to always be present.

Comment 11 Petr Viktorin 2019-08-12 11:26:36 UTC
I'm not sure if pip's devs see setuptools as a guaranteed dependency or an implementation detail. But I think the latter is likely, and it would make this an upstream bug.

Comment 12 Fedora Update System 2019-08-19 02:29:17 UTC
python-fypp-2.1.1-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Petr Viktorin 2019-10-29 14:20:48 UTC
At this point, it doesn't make sense to backport the fix for Fedora 29. It would be the right thing to do, but we don't have enough time to prioritize it.


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