Skip to content

pip download could create normalized directory structure #13478

@cjcodeproj

Description

@cjcodeproj

What's the problem this feature will solve?

Some users may work in offline or air-gapped environments, that prevent direct PyPi access. It is still possible to host packages using an internal repository server, as described in Hosting your own simple repository

When new packages from the outside are needed, they are can be retrieved using the pip download command from an online system, which is helpful because it also downloads any dependencies. Then the downloaded files can be imported into the offline environment using a process approved by the organization (like burning to a CD Rom)

It would be helpful if the download command had a feature to automatically create the normalized directory structure in the path that it's downloading to. Then when the files are imported into the offline environment, the directories do not have to be manually created. It would even be possible to run the rsync command from the import media to the internal repository path, which would save time.

Describe the solution you'd like

A simple flag for the pip download command like --manual-directories that builds the directory structure on the fly. So when a user runs pip download twine, it creates a directory named twine, and then downloads the twine package to that path.

Alternative Solutions

None tried.

Additional context

Normalized Names

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: downloadAbout fetching data from PyPI and other sourcestype: feature requestRequest for a new feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions