Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .pipenvrc for configuration #2949

Closed
AndrewPrifer opened this issue Oct 9, 2018 · 1 comment
Closed

Support .pipenvrc for configuration #2949

AndrewPrifer opened this issue Oct 9, 2018 · 1 comment
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.

Comments

@AndrewPrifer
Copy link

Is your feature request related to a problem? Please describe.

Configuring Pipenv through shell variables makes it hard to integrate it with graphical applications on macOS. The problem is that graphical applications don't inherit shell variables because they are not launched from the shell. Now, I know that there are some ways to configure env variables that are passed to GUI apps but these methods seemingly change with every release, and aren't very robust (e.g. it doesn't work if the app is launched through spotlight).

My problem specifically is that I use PyCharm, which integrates with Pipenv and I want to configure Pipenv to use PIPENV_VENV_IN_PROJECT, but it doesn't work when PyCharm launches Pipenv. This is an issue for any IDE that needs to integrate with Pipenv.

Describe the solution you'd like

I think the best solution would be to use an rc file. It is a common solution and would completely solve this problem. It would also be backward compatible because if .pipenvrc isn't found, we could fall back to environment variables (or alternatively, environment variables could override pipenvrc).

Additional context

I am on macOS where there is no reliable way to pass environment variables to GUI applications.


$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.7: /usr/local/bin/python3.7m

  • 3.7: /usr/local/bin/python3.7

  • 2.7.10: /usr/bin/python

  • 3.7.0: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '18.0.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT '
                     '2018; root:xnu-4903.201.2~1/RELEASE_X86_64',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • TERM_PROGRAM
  • TERM
  • SHELL
  • OMF_CONFIG
  • TMPDIR
  • PIPENV_VENV_IN_PROJECT
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • LC_ALL
  • USER
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • PWD
  • HOMEBREW_GITHUB_API_TOKEN
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • COLORFGBG
  • OMF_PATH
  • ITERM_SESSION_ID
  • LOGNAME
  • LC_CTYPE
  • COLORTERM
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: true

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2018.7.1/libexec/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • SHELL: /usr/local/bin/fish
  • LANG: en_US.UTF-8
  • PWD: /Users/andrew

@techalchemy techalchemy added the Type: Duplicate This issue is a duplicate of an already-existing issue. label Oct 9, 2018
@techalchemy
Copy link
Member

Please see #2778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.
Projects
None yet
Development

No branches or pull requests

2 participants