Skip to content

Commit cdfd8d0

Browse files
committed
build(setup.py): 超参数更新
1 parent 8a8063a commit cdfd8d0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
"Operating System :: OS Independent",
3131
"License :: OSI Approved :: Apache Software License"
3232
]
33+
SOURCE_FOLDER = 'python_setup'
34+
CONSOLE_SCRIPTS = 'print_hello = python_setup.tools.cli:main'
35+
36+
3337
# ---------------------- #
3438

3539

@@ -72,7 +76,7 @@ def run(self):
7276

7377

7478
def get_version():
75-
init_py_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "python_setup", "__init__.py")
79+
init_py_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), SOURCE_FOLDER, "__init__.py")
7680
init_py = open(init_py_path, "r").readlines()
7781
version_line = [l.strip() for l in init_py if l.startswith("__version__")][0]
7882
version = version_line.split("=")[-1].strip().strip("'\"")
@@ -97,7 +101,7 @@ def get_version():
97101
python_requires=PYTHON_REQUIRES,
98102
entry_points={
99103
'console_scripts': [
100-
'print_hello = python_setup.tools.cli:main'
104+
CONSOLE_SCRIPTS
101105
]
102106
},
103107
cmdclass={

0 commit comments

Comments
 (0)