diff --git a/setup.py b/setup.py index 3a966ea..bbe04ee 100755 --- a/setup.py +++ b/setup.py @@ -6,6 +6,8 @@ from distutils.core import setup import simplenote_cli +deps = ['urwid', 'requests'] + setup( name=simplenote_cli.__productname__, description=simplenote_cli.__description__, @@ -13,8 +15,12 @@ author=simplenote_cli.__author__, author_email=simplenote_cli.__author_email__, url=simplenote_cli.__url__, - requires=[ 'urwid', 'requests' ], - packages=[ 'simplenote_cli' ], - scripts=[ 'sncli' ] + requires=deps, + install_requires=deps, + packages=['simplenote_cli'], + entry_points={ + 'console_scripts': [ + 'sncli = simplenote_cli.sncli:main' + ] + } ) - diff --git a/simplenote_cli/__init__.py b/simplenote_cli/__init__.py index 7d911f3..06f109f 100644 --- a/simplenote_cli/__init__.py +++ b/simplenote_cli/__init__.py @@ -1,5 +1,5 @@ __productname__ = 'sncli' -__version__ = '0.1.2' +__version__ = '0.1.3' __copyright__ = "Copyright (c) 2014 Eric Davis" __author__ = "Eric Davis" __author_email__ = "edavis@insanum.com" diff --git a/simplenote_cli/sncli.py b/simplenote_cli/sncli.py index 5860bc0..43453ad 100644 --- a/simplenote_cli/sncli.py +++ b/simplenote_cli/sncli.py @@ -1167,7 +1167,8 @@ def usage(): ''') sys.exit(0) -def main(argv): + +def main(argv=sys.argv[1:]): verbose = False sync = True regex = False diff --git a/sncli b/sncli index 22d8ef7..ce1aca7 100755 --- a/sncli +++ b/sncli @@ -26,9 +26,8 @@ # Dude... just buy me a beer. :-) # -import sys from simplenote_cli import sncli if __name__ == '__main__': - sncli.main(sys.argv[1:]) + sncli.main()