Skip to content

Add support to read name of Pipfile from environment variable #999

Closed

Description

Name of the Pipfile is currently hardcoded in the extension.
This could come from an environment variable (see here https://github.com/pypa/pipenv/blob/5f48233637adc99bb16e6c601a728dc641bd5cd2/pipenv/environments.py#L29)

TODO: Confirm this is the case and create necessary PR accordingly.

Activity

  1. brettcannon commented on Mar 9, 2018

    @brettcannon
    Member

    In this instance we may need to just use pipenv --venv or some such command to do the detection appropriately.

  2. MikhailArkhipov commented on Mar 9, 2018

    @MikhailArkhipov

    Yes, running command is a better test, but watch out for performance. This was the reason for the file check. Interpreter selection and startup time.

  3. DonJayamanne commented on Mar 13, 2018

    @DonJayamanne
    Author

    Brett Cannon (@brettcannon) Mikhail Arkhipov (@MikhailArkhipov)
    Not sure what you two are referring to here. Running any pipenv command will not tell us the name of the Pipfile. The name of the Pip file can be provided in the environment variable:

    # Specify a custom Pipfile location.
    PIPENV_PIPFILE = os.environ.get('PIPENV_PIPFILE')
    

    All we need to do is:

    • Use the environment variable if it has been defined and the file exists
    • Else we fall back to the default of Pipfile (current behavior)
  4. brettcannon commented on Mar 13, 2018

    @brettcannon
    Member

    What I'm saying is we simply don't care about a Pipfile and instead just care if pipenv knows of a virtual environment for the directory.

  5. added a commit that references this issue on Mar 17, 2018
    487fc81
  6. locked as resolved and limited conversation to collaborators on Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions