mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-06 05:16:40 +08:00
Add package __version__.
This commit is contained in:
+1
-1
@@ -9,4 +9,4 @@ doc/build
|
||||
source/api
|
||||
scikits/image/opencv/*.new
|
||||
build
|
||||
|
||||
scikits/image/version.py
|
||||
|
||||
@@ -5,3 +5,4 @@ import os.path as _osp
|
||||
|
||||
data_dir = _osp.join(_osp.dirname(__file__), 'data')
|
||||
|
||||
from version import version as __version__
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user