snakeoil.version module¶
Version information.
- snakeoil.version.get_version(project, repo_file, api_version=None)[source]¶
- Determine a project’s version information. - Standardized version retrieval for git-based projects. In summary, if the api_version isn’t specified it imports __version__ from the main module for the project. Next it tries to import extended information from a generated file (for packages using snakeoil’s custom sdist phase) and if that fails assumes it’s in a git repo and grabs the git info instead. - Parameters:
- project – module name 
- repo_file – file belonging to module 
- api_version – version for the project, if not specified __version__ is imported from the main project module 
 
- Returns:
- a string describing the project version