question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

refactor pip's use of "#egg="

See original GitHub issue

I suspect pip doesn’t really need the"egg=" value (assuming we make some modifications)

setuptools used it in two cases:

  • installing single py files (which pip doesn’t support I guess?)
  • installing from svn urls

pip’s support is like so:

  1. officially documented for vcs urls (it determines the src or build dir, depending on whether it’s editable, and also determine’s it’s identification in the dependency resolution process.)
  2. although not documented, I’ve seen users (including myself) tack “egg=” onto archive urls (that currently don’t get their sdist filenames parsed, as you would expect (see #804), so using “egg=” for them makes them have a set build dir)

3 changes are needed, to make pip not require “egg=”:

  1. do away with the --no-install/–no-download “workflow” (see #906), which assumes fixed build dirs, and then drop fixed build dirs all together.
  2. make it a tested feature that non-specifier requirements (i.e. vcs urls, archive urls and paths) get processed first (i.e. unpacked and have their name/version determined), so they can properly participate in the dependency resolution process. this is currently true but not very prominent in the code and not tested afaict.
  3. when doing editable intalls from vcs urls, use some other approach to determine the “src” directory. Maybe just unpack it to /tmp, then determine the name, then move it back into src.

even if it turns out #egg=is not used in any way by pip, it may be important to document a convention as visual aid (possibly as #pkg=, see #1265), when the vcs url would otherwise contain no clear indication as to what it is. I know for example that various CM modules for chef and puppet make use of this indicator

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:24 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Jan 18, 2021

I opened #9471 for -e "NAME @ URL" support.

0reactions
woodruffwcommented, Dec 5, 2022

Cross-referencing: there’s a discussion here on removing egg= fragments entirely: https://discuss.python.org/t/killing-off-the-egg-fragment-once-and-for-all/21660

Read more comments on GitHub >

github_iconTop Results From Across the Web

cerebro-refactoring - PyPI
Refactoring is a systematic process of improving code without creating new functionality that can transform a mess into clean code and simple design....
Read more >
Releasing a new version of sourmash — sourmash 3.2.2.dev22+ ...
Testing a release¶. 0. First things first: check if Read the Docs is building properly for master. The build on Read the Docs...
Read more >
Pip install a python library from within a github monorepo
Try python -m pip install 'git+https://github.com/myorg/myrepo.git#egg=python_tools&subdirectory=python-tools'.
Read more >
.gitignore · flax-community/bertin-roberta-large-spanish at refactor
Use in Transformers ... *.egg. MANIFEST. # PyInstaller. # Usually these files are written by a python script from a ... pip-delete-this-directory.txt.
Read more >
03: Application Configuration with .ini Files - The Pylons Project
We can now install our project, thus generating (or re-generating) an "egg" at ini/tutorial.egg-info : $VENV/bin/pip install -e .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found