diff --git a/MindElec/cmake/package.cmake b/MindElec/cmake/package.cmake index cd5ffad9730cdc48eefd73e10230fd0d50fa71a7..407f46de377c0a86a7e0db1a42efe82d9a0f4609 100644 --- a/MindElec/cmake/package.cmake +++ b/MindElec/cmake/package.cmake @@ -44,7 +44,6 @@ message("===============${CMAKE_INSTALL_LIBDIR}+++++++++++++++") install( FILES ${CMAKE_SOURCE_DIR}/mindelec/__init__.py - ${CMAKE_SOURCE_DIR}/mindelec/version.py ${CMAKE_SOURCE_DIR}/setup.py DESTINATION ${INSTALL_PY_DIR} COMPONENT mindelec diff --git a/MindElec/mindelec/version.py b/MindElec/mindelec/version.py deleted file mode 100755 index e388e41545fa0557e6684311be848551d9690726..0000000000000000000000000000000000000000 --- a/MindElec/mindelec/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 Huawei Technologies Co., Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -"""Version""" -__version__ = '0.1.0' diff --git a/MindElec/setup.py b/MindElec/setup.py index ec8cfd4e94a1a92fabd6e6d5a93727b889be6366..63585a8c7429e9916b0760e0df844c205d674fdb 100644 --- a/MindElec/setup.py +++ b/MindElec/setup.py @@ -25,9 +25,9 @@ package_name = os.getenv('ME_PACKAGE_NAME').replace("\n", "") def read_version(): """generate python file""" - version_file = os.path.join(cur_dir, 'mindelec/', 'version.py') + version_file = os.path.join(cur_dir, '../', 'version.txt') with open(version_file, 'r') as f: - version_ = f.readlines()[-1].strip().split()[-1][1:-1] + version_ = f.readlines()[-1].strip() return version_ diff --git a/MindSPONGE/mindsponge/__init__.py b/MindSPONGE/mindsponge/__init__.py index b2ab4ffd54a5c226ed7e05bb545293f4cc8ba78a..771878fb24cdf4d36881dae236e76aab402f218b 100644 --- a/MindSPONGE/mindsponge/__init__.py +++ b/MindSPONGE/mindsponge/__init__.py @@ -21,10 +21,7 @@ from .md.potential import * from .md.partition import * from .md.control import * from .md.space import * -from .version import __version__ -__version_info__ = tuple(__version__.split('.')) - -__all__ = ['__version__', '__version_info__'] +__all__ = [] __all__.extend(md.__all__) __all__.sort() diff --git a/MindSPONGE/mindsponge/version.py b/MindSPONGE/mindsponge/version.py deleted file mode 100644 index e388e41545fa0557e6684311be848551d9690726..0000000000000000000000000000000000000000 --- a/MindSPONGE/mindsponge/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 Huawei Technologies Co., Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -"""Version""" -__version__ = '0.1.0' diff --git a/MindSPONGE/setup.py b/MindSPONGE/setup.py index c2d6221ab3a0377bae1252db4c27b4332a5b027d..c71cc69099f60b25f997933f4d8cd7a9feea7b4c 100644 --- a/MindSPONGE/setup.py +++ b/MindSPONGE/setup.py @@ -27,9 +27,9 @@ pkg_dir = os.path.join(cur_dir, 'build') def read_version(): """generate python file""" - version_file = os.path.join(cur_dir, 'mindsponge/', 'version.py') + version_file = os.path.join(cur_dir, '../', 'version.txt') with open(version_file, 'r') as f: - version_ = f.readlines()[-1].strip().split()[-1][1:-1] + version_ = f.readlines()[-1].strip() return version_ version = read_version() diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000000000000000000000000000000000..832d5f17a9887d66a4a04bb298852b705628f3d6 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.1.0rc1 \ No newline at end of file