Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/pythondistdeps: Only add setuptools requirement for egg-info … #973

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/pythondistdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@
depsextras.remove(dep)
deps = depsextras
# console_scripts/gui_scripts entry points need pkg_resources from setuptools
if (dist.get_entry_map('console_scripts') or
dist.get_entry_map('gui_scripts')):
if ((dist.get_entry_map('console_scripts') or
dist.get_entry_map('gui_scripts')) and
(lower.endswith('.egg') or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about egg. Can it even have entrypoints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so... If I "bdist_egg" the molecule package, and then install the resulting egg, the console_script is installed. However, I don't get useful results from this script on egg files. I'm unclear on whether we ever package egg (or wheel) files, so I'm not actually sure whether that's something that needs to be reviewed and fixed, or dropped.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. we can keep it be, until proven otherwise.

lower.endswith('.egg-info'))):
# stick them first so any more specific requirement overrides it
deps.insert(0, Requirement.parse('setuptools'))
# add requires/recommends based on egg/dist metadata
Expand Down