Created
July 2, 2018 18:03
-
-
Save SMillerDev/f4cfa15dc2fe4bbc56938a6b997a5d1b to your computer and use it in GitHub Desktop.
Script to port pip installs
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
#!/bin/bash | |
folder=$1 | |
files="${folder}*.dist-info" | |
regex="\/([a-zA-Z_\.0-9]*)-([0-9\.]*)\.dist-info" | |
for f in $files | |
do | |
if [[ $f =~ $regex ]] | |
then | |
name="${BASH_REMATCH[1]}" | |
version="${BASH_REMATCH[2]}" | |
echo "${name}==${version}" # concatenate strings | |
else | |
echo "$f doesn't match" >&2 # this could get noisy if there are a lot of non-mat$ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are several modules that aren't ready for the jump to python 3.7, like PyYAML, PyProj, matplotlib. So, your script might transfer the modules, but they probably won't work if called.
What I did was: