Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-sims
csst_ifs_sim
Commits
3a51a583
Commit
3a51a583
authored
Jan 08, 2025
by
Yan Zhaojun
Browse files
update
parent
1ab161c4
Pipeline
#7745
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
3a51a583
...
...
@@ -11,7 +11,7 @@ def get_version():
# 读取文件内容,使用正则找出版本号
with
open
(
init_path
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
version_match
=
re
.
search
(
r
'^__version__ = ["\']([^"\']*)["\']'
,
content
,
re
.
M
)
version_match
=
re
.
search
(
r
'^__version__
?
=
?
["\']([^"\']*)["\']'
,
content
,
re
.
M
)
if
version_match
:
return
version_match
.
group
(
1
)
raise
RuntimeError
(
"无法在 __init__.py 中找到 __version__ 定义"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment