Skip to content

Review the usability of pip's command line API for calling from other processes #6099

@pfmoore

Description

@pfmoore

As the officially supported means of using pip from your program is via its command line interface, we should consider whether our command line API is "automation friendly" in this sense.

Specific things we should look at:

  1. Allowing callers to suppress configuration set in the external environment (config files, environment variables). The --user flag is a common culprit here, as it doesn't interact well with certain other options like --target.
  2. Allowing callers to explicitly pass through certain environment settings (such as proxy) but not others.

At the moment, we have --isolated, but that's a bit of a sledgehammer option, requiring users to replicate pip's option-handling logic if they want to respect some config (for example, network settings) but not others (for example, --user)

Note that this would also help pip itself, in its test suite and in places like build environment creation.

I'm just adding this as a reminder that we should consider this use case. It may be that there's nothing that we actually need to do (except possibly provide some more detailed recommendations on "how to call pip from your application").

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: cliCommand line interface related things (optparse, option grouping etc)UXUser experience relatedtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions