瀏覽代碼

Use console_scripts entry_points in the setup.py file

Wes Turner 15 年之前
父節點
當前提交
1f70bd709c
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 4 1
      celery/bin/celeryd.py
  2. 7 0
      setup.py

+ 4 - 1
celery/bin/celeryd.py

@@ -271,6 +271,9 @@ def parse_options(arguments):
     return options
 
 
-if __name__ == "__main__":
+def main():
     options = parse_options(sys.argv[1:])
     run_worker(**vars(options))
+
+if __name__ == "__main__":
+    main()

+ 7 - 0
setup.py

@@ -97,5 +97,12 @@ setup(
         "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,
 )