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

add pip support #27

wants to merge 1 commit into from

Conversation

waxzce
Copy link
Contributor

@waxzce waxzce commented Aug 31, 2018

to update globally installed python stuff

Copy link
Contributor

@jaap3 jaap3 left a comment

Choose a reason for hiding this comment

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

Not sure if it's always sane to just upgrade python packages. There's no way to hold back any upgrades if for some reason you rely on a specific version of a package.

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
echo "🐍 Python pip"
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.

@@ -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.

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
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.

@welcoMattic
Copy link
Owner

This PR is open for a long time without news, should I close it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants