diff options
-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', |