diff --git a/deepmd/__about__.py b/deepmd/__about__.py new file mode 100644 index 0000000000..2c6b9a1374 --- /dev/null +++ b/deepmd/__about__.py @@ -0,0 +1 @@ +__version__ = 'unknown' diff --git a/setup.py b/setup.py index 7cbf47c780..4c6ccc123d 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ setup( name="deepmd-kit", setup_requires=setup_requires, - use_scm_version={'write_to': 'source/train/_version.py'}, + use_scm_version={'write_to': 'deepmd/_version.py'}, author="Han Wang", author_email="wang_han@iapcm.ac.cn", description="A deep learning package for many-body potential energy representation and molecular dynamics", diff --git a/source/train/__init__.py b/source/train/__init__.py index 5ee947046a..5d656dc0d4 100644 --- a/source/train/__init__.py +++ b/source/train/__init__.py @@ -6,3 +6,8 @@ set_mkl() +try: + from ._version import version as __version__ +except ImportError: + from .__about__ import __version__ +