Skip to content

Commit 94a9f85

Browse files
stop having the runner script just as script but instead have a script as console_script (kyuridenamida#46)
1 parent 93eb63b commit 94a9f85

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
recursive-include atcodertools/tools/templates/ *
1+
recursive-include atcodertools/tools/templates/ *
2+
include requirements.txt

atcoder-tools renamed to atcodertools/tools/run_script.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/usr/bin/env python3
21
import sys
32

43
from atcodertools.tools.envgen import main as envgen_main
54
from atcodertools.tools.tester import main as tester_main
65

7-
if __name__ == '__main__':
6+
7+
def main():
88
if len(sys.argv) < 2 or sys.argv[1] not in ("gen", "test"):
99
print("Usage:")
1010
print("{} gen -- to generate workspace".format(sys.argv[0]))
@@ -19,3 +19,7 @@
1919

2020
if sys.argv[1] == "test":
2121
sys.exit(tester_main(prog, args))
22+
23+
24+
if __name__ == '__main__':
25+
main()

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ def _requires_from_file(filename):
2727
packages=find_packages(exclude=('tests',)),
2828
install_requires=_requires_from_file('requirements.txt'),
2929
license="MIT",
30-
scripts=['atcoder-tools'],
30+
entry_points={
31+
"console_scripts": [
32+
"atcoder-tools=atcodertools.tools.run_script:main",
33+
],
34+
},
3135
include_package_data=True,
3236
classifiers=[
3337
'Development Status :: 4 - Beta',

0 commit comments

Comments
 (0)