setup.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import os
  4. import sys
  5. import codecs
  6. import platform
  7. try:
  8. from setuptools import setup, find_packages, Command
  9. from setuptools.command.test import test as TestCommand
  10. except ImportError:
  11. from ez_setup import use_setuptools
  12. use_setuptools()
  13. from setuptools import setup, find_packages, Command
  14. from setuptools.command.test import test as TestCommand
  15. import celery as distmeta
  16. class QuickRunTests(TestCommand):
  17. extra_env = dict(SKIP_RLIMITS=1, QUICKTEST=1)
  18. def run(self, *args, **kwargs):
  19. for env_name, env_value in self.extra_env.items():
  20. os.environ[env_name] = str(env_value)
  21. TestCommand.run(self, *args, **kwargs)
  22. install_requires = []
  23. try:
  24. import importlib
  25. except ImportError:
  26. install_requires.append("importlib")
  27. install_requires.extend([
  28. "python-dateutil",
  29. "anyjson",
  30. "carrot>=0.10.6",
  31. "pyparsing",
  32. ])
  33. py_version = sys.version_info
  34. if sys.version_info < (2, 6):
  35. install_requires.append("multiprocessing==2.6.2.1")
  36. if sys.version_info < (2, 5):
  37. install_requires.append("uuid")
  38. if os.path.exists("README.rst"):
  39. long_description = codecs.open("README.rst", "r", "utf-8").read()
  40. else:
  41. long_description = "See http://pypi.python.org/pypi/celery"
  42. setup(
  43. name="celery",
  44. version=distmeta.__version__,
  45. description=distmeta.__doc__,
  46. author=distmeta.__author__,
  47. author_email=distmeta.__contact__,
  48. url=distmeta.__homepage__,
  49. platforms=["any"],
  50. license="BSD",
  51. packages=find_packages(exclude=['ez_setup', 'tests', 'tests.*']),
  52. scripts=["bin/celeryd", "bin/celerybeat",
  53. "bin/camqadm", "bin/celeryd-multi",
  54. "bin/celeryev"],
  55. zip_safe=False,
  56. install_requires=install_requires,
  57. tests_require=['nose', 'nose-cover3', 'unittest2', 'simplejson'],
  58. cmdclass={"quicktest": QuickRunTests},
  59. test_suite="nose.collector",
  60. classifiers=[
  61. "Development Status :: 5 - Production/Stable",
  62. "Operating System :: OS Independent",
  63. "Environment :: No Input/Output (Daemon)",
  64. "Intended Audience :: Developers",
  65. "License :: OSI Approved :: BSD License",
  66. "Operating System :: POSIX",
  67. "Topic :: Communications",
  68. "Topic :: System :: Distributed Computing",
  69. "Topic :: Software Development :: Libraries :: Python Modules",
  70. "Programming Language :: Python",
  71. "Programming Language :: Python :: 2",
  72. "Programming Language :: Python :: 2.4",
  73. "Programming Language :: Python :: 2.5",
  74. "Programming Language :: Python :: 2.6",
  75. "Programming Language :: Python :: 2.7",
  76. ],
  77. entry_points={
  78. 'console_scripts': [
  79. 'celeryd = celery.bin.celeryd:main',
  80. 'celerybeat = celery.bin.celerybeat:main',
  81. 'camqadm = celery.bin.camqadm:main',
  82. 'celeryev = celery.bin.celeryev:main',
  83. 'celeryctl = celery.bin.celeryctl:main',
  84. 'celeryd-multi = celery.bin.celeryd_multi:main',
  85. ],
  86. },
  87. long_description=long_description,
  88. )