ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Pipenv​Path

by dhelonious ST3

Automatically add pipenv virtual environment paths to th Sublime Text 3 environment.

Details

Installs

  • Total 519
  • Win 228
  • OS X 160
  • Linux 131
May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7
Windows 0 1 0 1 0 2 1 4 4 0 1 0 1 1 2 1 1 0 0 0 2 2 0 1 0 0 1 0 0 1 1 0 0 2 3 2 5 3 1 1 2 0 2 1 2 0
OS X 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 2 0 1 0 1 0 1 4 0 2 1 1 3 2 0 0 1 3 1 0 0 1
Linux 0 2 0 0 1 1 3 0 2 2 1 1 1 0 1 5 0 0 0 1 1 0 1 0 1 2 2 0 0 1 2 1 0 1 1 0 1 1 2 0 0 1 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

PipenvPath

Automatically add pipenv virtual environment paths to the Sublime Text 3 environment.

Pipenv is a wonderful packaging and dependency management tool for Python. However, while it manages virtual environments automatically, the name and thus the path of the venvs are random/hashed. One could add the venv path manually on a per-project basis using the Environment Settings plugin, though, this is tedious.

PipenvPath will automatically add the venv path managed by Pipenv to the PATH variable of the current project, which is yielded by the pipenv --venv command. This should work out of the box without any configuration, assuming that the Pipenv executable path is already provided by the PATH variable. Otherwise, the location of the Pipenv executable can be specified in Preferences.sublime-settings. A typical setup might look like this:

"pipenv_path":
    {
        "linux": "$HOME/.local/bin/pipenv",
        "windows": "%HOMEPATH%\\AppData\\Roaming\\Python\\Python37\\Scripts\\pipenv.exe"
    }

NOTE: You can also use the "osx" key (see the sublime.platform() documentation).

Installation

Clone this repository to your Sublime Text 3 Packages folder. You can find it by using the menu: Preferences > Browse Packages…

Credits

Based on the Environment Settings plugin by Daniele Niero.