Skip to content

pip cannot prepare more than one requirement for the same project #7855

Open
@pfmoore

Description

@pfmoore

An InstallRequirement has a source_dir attribute, which is where the requirement will be built. The code here computes the name of that build directory, using the name of the requirement/project.

When preparing, the code confirms that the build directory isn't already in use here.

This causes a problem if pip ever needs to prepare more than one version of a particular project (foo-1.0 and foo-2.0, as both of these will use the same build directory). However, this is exactly what the new resolver needs to do in order to compute metadata for multiple candidates.

This is probably fixable by using randomised build directory names, or something similar. @pradyunsg @uranusjr - any thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: build logicStuff related to metadata generation / wheel generationstate: needs discussionThis needs some more discussiontype: maintenanceRelated to Development and Maintenance Processes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions