This file contains hidden or 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
import copy | |
# ----- START [distutils2.version] ----- # | |
import re | |
_FINAL_MARKER = ('z',) | |
_VERSION_RE = re.compile(r''' | |
^ | |
(?P<version>\d+\.\d+) # minimum 'N.N' |
This file contains hidden or 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
# Compliments to Nick Coghlan for coming up with this sort of scheme | |
# foo 1.2 is not installed, this command would download, and "install" | |
# it into ~/.pip/dists/foo-1.2/ and then link $VENV/site-packages/foo -> ~/.pip/dists/foo-1.2/ | |
$ pip install foo==1.2 | |
# In another virtualenv this command would see that ~/.pip/dists/foo-1.2/ already | |
# exists so instead of downloading + installing it, it simply links $OTHER_VENV/site-packages/foo/ | |
# to ~/.pip/dists/foo-1.2/ | |
$ pip install foo=1.2 |