toyz package¶
Subpackages¶
Submodules¶
toyz.version module¶
- toyz.version.debug = False¶
- try:
- from ._compiler import compiler
- except ImportError:
- compiler = “unknown”
- try:
- from .cython_version import cython_version
- except ImportError:
- cython_version = “unknown”
- toyz.version.get_git_devstr(sha=False, show_warning=True, path=None)¶
Determines the number of revisions in this repository.
- sha : bool
- If True, the full SHA1 hash will be returned. Otherwise, the total count of commits in the repository will be used as a “revision number”.
- show_warning : bool
- If True, issue a warning if git returns an error code, otherwise errors pass silently.
- path : str or None
- If a string, specifies the directory to look in to find the git repository. If None, the current working directory is used. If given a filename it uses the directory containing that file.
- devversion : str
- Either a string with the revsion number (if sha is False), the SHA1 hash of the current commit (if sha is True), or an empty string if git version info could not be identified.
- toyz.version.update_git_devstr(version, path=None)¶
Updates the git revision string if and only if the path is being imported directly from a git working copy. This ensures that the revision number in the version string is accurate.