Skip to content

Commit a7bf8ae

Browse files
kotamanegikyuridenamida
authored andcommitted
Fix compatibility problem on Windows (kyuridenamida#122)
* fixed for compatibility with Windows * pep-8 based code * autopep8 * CRLF -> LF
1 parent 53cb92b commit a7bf8ae

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
recursive-include atcodertools/tools/templates/ *
1+
include atcodertools/tools/templates/*
22
include requirements.txt
33
include atcodertools/tools/atcodertools-default.toml

atcoder-tools renamed to atcodertools/atcoder_tools.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/usr/bin/env python3
22
import sys
33

4-
from atcodertools.release_management.version_check import get_latest_version, VersionCheckError
4+
from atcodertools.release_management.version_check import (
5+
get_latest_version,
6+
VersionCheckError,
7+
)
58
from atcodertools.tools.envgen import main as envgen_main
69
from atcodertools.tools.tester import main as tester_main
710
from atcodertools.tools.submit import main as submit_main
@@ -32,7 +35,7 @@ def notify_if_latest_version_found():
3235
print(Style.RESET_ALL)
3336

3437

35-
if __name__ == '__main__':
38+
def main():
3639
notify_if_latest_version_found()
3740

3841
if len(sys.argv) < 2 or sys.argv[1] not in ("gen", "test", "submit", "codegen"):
@@ -59,3 +62,7 @@ def notify_if_latest_version_found():
5962

6063
if sys.argv[1] == "codegen":
6164
codegen_main(prog, args)
65+
66+
67+
if __name__ == '__main__':
68+
main()

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from atcodertools.release_management.version import __version__
88

99
try:
10-
with open('README.md') as f:
10+
with open('README.md', encoding="utf-8") as f:
1111
readme = f.read()
1212
except IOError:
1313
readme = ''
@@ -28,7 +28,11 @@ def _requires_from_file(filename):
2828
packages=find_packages(exclude=('tests',)),
2929
install_requires=_requires_from_file('requirements.txt'),
3030
license="MIT",
31-
scripts=['atcoder-tools'],
31+
entry_points={
32+
'console_scripts': [
33+
'atcoder-tools = atcodertools.atcoder_tools:main',
34+
],
35+
},
3236
include_package_data=True,
3337
classifiers=[
3438
'Development Status :: 4 - Beta',

0 commit comments

Comments
 (0)