Skip to content

Commit

Permalink
Add --system-site-package option to python-venv
Browse files Browse the repository at this point in the history
Added --system-site-package option when creating new python venv.
This enables to access the system-site packages from the venv.
So you no longer need to install common packages every time.
  • Loading branch information
eudika committed Aug 30, 2020
1 parent 49d2fa8 commit c8d794e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions runcoms/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ function workon() {
if [ -f "$name/bin/activate" ]; then
source "$name/bin/activate"
elif [ ! -e $name ]; then
python3 -m venv $name \
&& source "$name/bin/activate" \
&& python3 -m pip install neovim jedi flake8 mypy autopep8 isort
python3 -m venv --system-site-packages $name \
&& source "$name/bin/activate"
else
echo "'$name' is not a venv directory" >&2
return 1
Expand Down

0 comments on commit c8d794e

Please sign in to comment.