diff options
author | John Peter Yamauchi <jpyamauchi@gmail.com> | 2020-08-06 12:02:01 -0500 |
---|---|---|
committer | John Peter Yamauchi <jpyamauchi@gmail.com> | 2020-08-06 12:02:01 -0500 |
commit | d40956bd3350e6ae2a6e5758eb169b7889299ce6 (patch) | |
tree | 39cedd14aaeac25012f78b6edd9ba645609b6a4c | |
parent | 9d972bfa792c08d4f3ce6a6b7cfd9877f801b5e3 (diff) | |
download | screenplain-d40956bd3350e6ae2a6e5758eb169b7889299ce6.tar.gz |
Add Windows support
-rwxr-xr-x | bin/screenplain | 6 | ||||
-rw-r--r-- | bin/test.bat | 2 | ||||
-rw-r--r-- | screenplain/main.py | 5 | ||||
-rwxr-xr-x | setup.py | 8 |
4 files changed, 12 insertions, 9 deletions
diff --git a/bin/screenplain b/bin/screenplain deleted file mode 100755 index e28cb73..0000000 --- a/bin/screenplain +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python -import sys - -if __name__ == '__main__': - from screenplain.main import main - main(sys.argv[1:]) diff --git a/bin/test.bat b/bin/test.bat new file mode 100644 index 0000000..9c75fa3 --- /dev/null +++ b/bin/test.bat @@ -0,0 +1,2 @@ +nosetests --nocapture --with-doctest --doctest-tests +pycodestyle --ignore=E402,W504 screenplain tests diff --git a/screenplain/main.py b/screenplain/main.py index 9f337f1..30a5175 100644 --- a/screenplain/main.py +++ b/screenplain/main.py @@ -134,5 +134,10 @@ def main(args): output.close() +def cli(): + """setup.py entry point for console scripts.""" + main(sys.argv[1:]) + + if __name__ == '__main__': main(sys.argv[1:]) @@ -35,9 +35,11 @@ setup( package_data={ 'screenplain.export': ['default.css'] }, - scripts=[ - 'bin/screenplain' - ], + entry_points={ + 'console_scripts': [ + 'screenplain = screenplain.main:cli' + ] + }, classifiers=[ 'Programming Language :: Python :: 3', 'License :: OSI Approved :: MIT License', |