Created
September 16, 2014 18:44
-
-
Save fmder/abc048e35cf01a5c8adf to your computer and use it in GitHub Desktop.
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
import subprocess | |
try: | |
tree = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip() | |
except OSError: | |
import warnings | |
warnings.warn("Cannot link examples because we cannot retrieve the git version", Warning) | |
else: | |
extlinks = {'example': ('https://github.com/DEAP/deap/blob/{tree}/examples/%s.py'.format(tree=tree), "examples/")} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment