def cache_version_id(): """Returns the version id to use for the incremental hash. If setup.py is run from a git repo, the git commit hash will be included if possible. If not, then this function will fall back to using the default version id from mypy/version.py.""" if git.is_git_repo('.') and git.have_git(): return __version__ + '-' + git.git_revision('.').decode('utf-8') else: # Default fallback return __version__
import os from mypy import git __version__ = '0.620+dev' base_version = __version__ mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) if __version__.endswith('+dev') and git.is_git_repo( mypy_dir) and git.have_git(): __version__ += '-' + git.git_revision(mypy_dir).decode('utf-8') if git.is_dirty(mypy_dir): __version__ += '-dirty' del mypy_dir
import os from mypy import git __version__ = '0.540-dev' base_version = __version__ mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) if git.is_git_repo(mypy_dir) and git.have_git(): __version__ += '-' + git.git_revision(mypy_dir).decode('utf-8') if git.is_dirty(mypy_dir): __version__ += '-dirty' del mypy_dir
import os from mypy import git # Base version. # - Release versions have the form "0.NNN". # - Dev versions have the form "0.NNN+dev" (PLUS sign to conform to PEP 440). # - For 1.0 we'll switch back to 1.2.3 form. __version__ = '0.680+dev' base_version = __version__ mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) if __version__.endswith('+dev') and git.is_git_repo(mypy_dir) and git.have_git(): __version__ += '.' + git.git_revision(mypy_dir).decode('utf-8') if git.is_dirty(mypy_dir): __version__ += '.dirty' del mypy_dir
import os from mypy import git __version__ = '0.600+dev' base_version = __version__ mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) if __version__.endswith('+dev') and git.is_git_repo(mypy_dir) and git.have_git(): __version__ += '-' + git.git_revision(mypy_dir).decode('utf-8') if git.is_dirty(mypy_dir): __version__ += '-dirty' del mypy_dir
import os from mypy import git __version__ = '0.4.7-dev' base_version = __version__ mypy_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) if git.is_git_repo(mypy_dir) and git.have_git(): __version__ += '-' + git.git_revision(mypy_dir).decode('utf-8') if git.is_dirty(mypy_dir): __version__ += '-dirty' del mypy_dir