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 207
  • Win 98
  • OS X 59
  • Linux 50
Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8
Windows 0 0 0 3 2 0 1 3 0 0 0 0 0 1 1 2 1 1 1 4 2 0 0 0 0 3 2 0 0 0 3 2 0 1 0 1 0 0 2 0 1 3 1 2 1 1
OS X 0 0 1 0 0 2 0 0 0 0 0 1 2 2 1 1 0 0 1 1 0 1 0 0 1 1 1 2 0 0 1 0 0 1 2 1 1 0 1 1 1 2 0 1 2 0
Linux 0 0 0 0 0 5 4 1 1 0 0 0 0 1 0 0 1 0 0 0 2 0 1 1 0 0 1 0 1 1 2 0 0 0 0 0 1 0 2 1 0 1 2 0 2 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.