Explorar o código

Use console_scripts entry_points in the setup.py file

Wes Turner %!s(int64=15) %!d(string=hai) anos
pai
achega
1f70bd709c
Modificáronse 2 ficheiros con 11 adicións e 1 borrados
  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
     return options
 
 
 
 
-if __name__ == "__main__":
+def main():
     options = parse_options(sys.argv[1:])
     options = parse_options(sys.argv[1:])
     run_worker(**vars(options))
     run_worker(**vars(options))
+
+if __name__ == "__main__":
+    main()

+ 7 - 0
setup.py

@@ -97,5 +97,12 @@ setup(
         "Topic :: System :: Distributed Computing",
         "Topic :: System :: Distributed Computing",
         "Topic :: Software Development :: Libraries :: Python Modules",
         "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,
     long_description=long_description,
 )
 )