Commit c84b72c4 authored by xiabo's avatar xiabo
Browse files

适配版本号

parent 047839b8
...@@ -83,7 +83,7 @@ def get_version_add(sha: Optional[str] = None) -> str: ...@@ -83,7 +83,7 @@ def get_version_add(sha: Optional[str] = None) -> str:
lines=[] lines=[]
with open(add_version_path, 'r',encoding='utf-8') as file: with open(add_version_path, 'r',encoding='utf-8') as file:
lines = file.readlines() lines = file.readlines()
lines[2] = "__version__='2.0.0+{}'\n".format(version) lines[2] = "__dcu_version__ = '2.0.0+{}'\n".format(version)
with open(add_version_path, encoding="utf-8",mode="w") as file: with open(add_version_path, encoding="utf-8",mode="w") as file:
file.writelines(lines) file.writelines(lines)
file.close() file.close()
...@@ -94,7 +94,7 @@ def get_version(): ...@@ -94,7 +94,7 @@ def get_version():
version_file = 'mmcv/version.py' version_file = 'mmcv/version.py'
with open(version_file, encoding='utf-8') as f: with open(version_file, encoding='utf-8') as f:
exec(compile(f.read(), version_file, 'exec')) exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__'] return locals()['__dcu_version__']
def parse_requirements(fname='requirements/runtime.txt', with_version=True): def parse_requirements(fname='requirements/runtime.txt', with_version=True):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment