Skip to content

Wrong egg-info selected #5070

@Grummel7

Description

@Grummel7

setuptools version

setuptools-68.2.2

Python version

python3.12

OS

RHEL8

Additional environment information

The problem seems to exists for quite some time. Googling for it, I found this old posting, which describes the same issue: https://stackoverflow.com/questions/62579080/issue-with-loading-entry-point-possibly-connected-to-version-including-dev-tag

Description

I have a script that contains: load_entry_point('CCMS==8.8', 'console_scripts', 'ccms_config')

In /usr/lib/python3.12/site-packages/ there are multiple egg-infos:

CCMS-8.7-py3.12.egg-info
CCMS-8.7.2-py3.12.egg-info
CCMS-8.8-py3.12.egg-info

Actually all but the last are empty left-overs from old RPMs.
On most machines, all works fine, but on some, setuptools tries to use CCMS-8.7.2-py3.12.egg-info and the script fails.

Expected behavior

Since load_entry_point is called with "CCMS==8.8", I would expect setuptools to use CCMS-8.8-py3.12.egg-info on all machines

I don't really understand how all this setup stuff is done in the RPM, but the whole issue wouldn't arise, if the egg-info directory were part of the RPM. Currently only the files are part of the RPM, which is why RPM does not automatically delete the directory during an upgrade.

How to Reproduce

I don't know how to reproduce it.
We install a newer CCMS RPM, and most of the time everything is fine. Sometimes it is not, and when we have the issue, it remains, until we delete the old egg-info.

I guess we should modify our RPMs to delete old egg-infos, but nevertheless. old egg-infos shouldn't break anything like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions