Skip to content

Commit

Permalink
Use console_scripts entry_points in the setup.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
westurner authored and Ask Solem committed Dec 22, 2009
1 parent 3e57f99 commit cf2148e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 4 additions & 2 deletions celery/bin/celerybeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ def parse_options(arguments):
options, values = parser.parse_args(arguments)
return options


if __name__ == "__main__":
def main():
options = parse_options(sys.argv[1:])
run_clockservice(**vars(options))

if __name__ == "__main__":
main()
6 changes: 4 additions & 2 deletions celery/bin/celeryd.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def set_process_status(info):
info = "%s (%s)" % (info, " ".join(sys.argv[arg_start:]))
platform.set_mp_process_title("celeryd", info=info)


if __name__ == "__main__":
def main():
options = parse_options(sys.argv[1:])
run_worker(**vars(options))

if __name__ == "__main__":
main()
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,12 @@ def run(self):
"Topic :: System :: Distributed Computing",
"Topic :: Software Development :: Libraries :: Python Modules",
],
entry_points={
'console_scripts': [
'celeryd = celery.bin.celeryd:main',
'celeryinit = celery.bin.celeryinit:main',
'celerybeat = celery.bin.celerybeat:main'
]
},
long_description=long_description,
)

0 comments on commit cf2148e

Please sign in to comment.