Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

add pip support #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins.d/pip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a check to see if pip is available, it's not available by default on OS X.

echo "🐍 Python pip"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since pip freeze doesn't list pip itself it's necessary to first call pip install -U pip to self update.

pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this won't work if you happen to run kymsu inside a virtualenv. Maybe add some check to see if a virtualenv is active? Something like if [[ -z $VIRTUAL_ENV && -z $PYENV_VERSION ]]; then

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to call pip install -U --upgrade-strategy eager so dependencies also get updated.

echo ""