PyVer provides a mechanims to provided 2 module level variables for a Python GIT project:
<package>.__version__: | The static python version set in, and pulled from setup.py
|
---|---|
<package>.__githash__: | The SHA1 git hash of the last commit on the current branch at the time
setup.py was run. |
Version and hash information is generated and saved to <package>/version.txt
at the time the sdist or bdist is created. To ensure version.txt is
shipped along with the sdist it should be added to MANIFEST.in:
include <package>/version.txt
This is necessary so at install time version informaion will be available without the git repository.
To enable PyVer in setup.py you will need to add a few keywords to you call to setup in setup.py:
setup(
...,
pyver=True,
dependency_links=['https://sips.ssec.wisc.edu/eggs/simple'],
setup_requires=['PyVer'],
...,
)
If you do not have access to the SIPS egg repo you will have to either provide the PyVer package on your own egg server or simply ensure PyVer is installed before your package.