Add package __version__.

This commit is contained in:
Stefan van der Walt
2009-10-24 11:48:58 +02:00
parent 714a49a849
commit c3dd1e486e
3 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ doc/build
source/api
scikits/image/opencv/*.new
build
scikits/image/version.py
+1
View File
@@ -5,3 +5,4 @@ import os.path as _osp
data_dir = _osp.join(_osp.dirname(__file__), 'data')
from version import version as __version__
+15
View File
@@ -37,7 +37,22 @@ def configuration(parent_package='', top_path=None):
return config
def write_version_py(filename='scikits/image/version.py'):
template = """# THIS FILE IS GENERATED FROM THE SCIKITS.IMAGE SETUP.PY
version='%s'
"""
vfile = open(os.path.join(os.path.dirname(__file__),
filename), 'w')
try:
vfile.write(template % VERSION)
finally:
vfile.close()
if __name__ == "__main__":
write_version_py()
setup(
name=DISTNAME,
description=DESCRIPTION,