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_gehong
Commits
02b9627f
Commit
02b9627f
authored
Jan 07, 2025
by
Shuai Feng
Browse files
update 3.0.1
parent
8958b486
Pipeline
#7716
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
02b9627f
import
setuptools
import
setuptools
import
os
import
re
with
open
(
"README.md"
,
"r"
)
as
fh
:
with
open
(
"README.md"
,
"r"
)
as
fh
:
long_description
=
fh
.
read
()
long_description
=
fh
.
read
()
...
@@ -10,17 +12,32 @@ with open("requirements.txt", "r") as f:
...
@@ -10,17 +12,32 @@ with open("requirements.txt", "r") as f:
if
not
req
.
startswith
(
"#"
)
and
req
.
__contains__
(
"=="
)
if
not
req
.
startswith
(
"#"
)
and
req
.
__contains__
(
"=="
)
]
]
def
get_version
():
# 找到 __init__.py 的路径
init_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"csst_ifs_gehong"
,
"__init__.py"
)
# 读取文件内容,使用正则找出版本号
with
open
(
init_path
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
content
=
f
.
read
()
version_match
=
re
.
search
(
r
'^__version__ = ["\']([^"\']*)["\']'
,
content
,
re
.
M
)
if
version_match
:
return
version_match
.
group
(
1
)
raise
RuntimeError
(
"无法在 __init__.py 中找到 __version__ 定义"
)
setuptools
.
setup
(
setuptools
.
setup
(
name
=
'csst_ifs_gehong'
,
name
=
'csst_ifs_gehong'
,
version
=
'3.0.0'
,
version
=
get_version
()
,
license
=
'MIT'
,
license
=
'MIT'
,
author
=
"Shuai Feng"
,
author
=
"Shuai Feng"
,
author_email
=
'sfeng@hebtu.edu.cn'
,
author_email
=
'sfeng@hebtu.edu.cn'
,
description
=
'The packages for the scientific data simulation of CSST-IFS'
,
# short description
description
=
'The packages for the scientific data simulation of CSST-IFS'
,
# short description
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
"text/markdown"
,
long_description_content_type
=
"text/markdown"
,
url
=
'https://csst-tb.bao.ac.cn/code/csst-sims/csst_ifs_gehong'
,
url
=
'https://csst-tb.bao.ac.cn/code/csst-sims/csst_ifs_gehong'
,
project_urls
=
{
project_urls
=
{
'Source'
:
'https://csst-tb.bao.ac.cn/code/csst-sims/csst_ifs_gehong'
,
'Source'
:
'https://csst-tb.bao.ac.cn/code/csst-sims/csst_ifs_gehong'
,
},
},
packages
=
setuptools
.
find_packages
(),
packages
=
setuptools
.
find_packages
(),
...
...
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