Use console_scripts instead of scripts.

Unfortunately zc.buildout does not support distribute/setuptools script
option (see https://bugs.launchpad.net/zc.buildout/+bug/422724), but it
does support console_scripts. This also makes the scripts importable,
allowing for unittest and code reuse.
main
Wichert Akkerman 13 years ago
parent 1d27223069
commit 97d2e4d784

@ -60,3 +60,4 @@ def main():
if __name__ == '__main__':
main()

@ -177,6 +177,3 @@ def main():
interval(args.interval, func, args)
except ConnectionError as e:
print(e)
if __name__ == '__main__':
main()

@ -71,7 +71,3 @@ def main():
w.work(burst=args.burst)
except ConnectionError as e:
print(e)
if __name__ == '__main__':
main()

@ -42,7 +42,11 @@ setup(
zip_safe=False,
platforms='any',
install_requires=get_dependencies(),
scripts=['bin/rqinfo', 'bin/rqworker'],
entry_points='''\
[console_scripts]
rqworker = rq.scripts.rqworker:main
rqinfo = rq.scripts.rqinfo:main
''',
classifiers=[
# As from http://pypi.python.org/pypi?%3Aaction=list_classifiers
#'Development Status :: 1 - Planning',

Loading…
Cancel
Save