Skip to content

refactor pip's use of "#egg="  #1289

@qwcode

Description

@qwcode

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 The --build-dir options doesn't work for local archive installs #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 refactor --no-install/--no-download/--download (and use mkdtemp build dirs) #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: dependency resolutionAbout choosing which dependencies to installC: direct urlDirect URL references (PEP 440, PEP 508, PEP 610)C: unnamed reqsHandling and processing unnamed requirementsstate: awaiting PRFeature discussed, PR is neededtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions