-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 26223-add-replaceable-monitoring-cluster-d…
…efinition
- Loading branch information
Showing
4 changed files
with
144 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import venvactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Activates the current venv as if the activate script had been sourced | ||
import collections | ||
import os | ||
import sys | ||
|
||
# Prepend the venv bin to PATH (without introducing duplicate entries) | ||
path = [os.path.join(sys.prefix, 'bin')] + os.environ['PATH'].split(':') | ||
os.environ['PATH'] = ':'.join(collections.OrderedDict.fromkeys(path).keys()) | ||
|
||
# Set VIRTUAL_ENV to the venv directory | ||
os.environ['VIRTUAL_ENV'] = sys.prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters