-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PyPI v0.6.0: Added ability to reinstall all dependencies.
- Loading branch information
Showing
7 changed files
with
111 additions
and
3 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.5.0' | ||
__version__ = '0.6.0' |
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,50 @@ | ||
#!/usr/local/bin/zsh | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
NC='\033[0m' # No Color | ||
|
||
echo "Reinstalling all dependencies..." | ||
echo "" | ||
# echo "${GREEN}PROD dependencies > requirements.txt${NC}:" | ||
python "$1/create_reqs.py" dep_type___PROD silent___YES | ||
# echo "" | ||
# echo "${GREEN}DEV dependencies > requirements-dev.txt${NC}:" | ||
python "$1/create_reqs.py" dep_type___DEV silent___YES | ||
|
||
# Uninstall all | ||
echo "Removing all installed dependencies (excluding editable)..." | ||
echo "" | ||
pip freeze --exclude-editable | xargs pip uninstall -y | ||
|
||
# Reinstall DEVs | ||
echo "Processing DEV dependencies:" | ||
while read in; | ||
do | ||
echo "Processing $in ..." | ||
if pip install -U $in; then | ||
python "$1/update_metadata.py" package___"$in" action___INSTALL package_with_version___"$(pip freeze | grep -iF "$in")" dep_type___"DEV" | ||
echo "${GREEN}Installation of package $in is ready.${NC}" | ||
else | ||
echo "${RED}Installation of package $in failed. See error above.${NC}" | ||
fi; | ||
done < requirements-dev.txt | ||
|
||
# Reinstall PRODs | ||
echo "Processing PROD dependencies:" | ||
while read in; | ||
do | ||
echo "Processing $in ..." | ||
if pip install -U $in; then | ||
python "$1/update_metadata.py" package___"$in" action___INSTALL package_with_version___"$(pip freeze | grep -iF "$in")" dep_type___"PROD" | ||
echo "${GREEN}Installation of package $in is ready.${NC}" | ||
else | ||
echo "${RED}Installation of package $in failed. See error above.${NC}" | ||
fi; | ||
done < requirements.txt | ||
|
||
rm requirements-dev.txt | ||
rm requirements.txt | ||
|
||
echo "" | ||
echo "${GREEN}Successfully reinstalled all dependencies.${NC}" |
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