setup.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ##############################################################################
  2. #
  3. # Copyright (c) 2006-2011 Agendaless Consulting and Contributors.
  4. # All Rights Reserved.
  5. #
  6. # This software is subject to the provisions of the BSD-like license at
  7. # http://www.repoze.org/LICENSE.txt. A copy of the license should accompany
  8. # this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
  9. # EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,
  10. # THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND
  11. # FITNESS FOR A PARTICULAR PURPOSE
  12. #
  13. ##############################################################################
  14. import os
  15. import sys
  16. if sys.version_info[:2] < (2, 3) or sys.version_info[0] > 2:
  17. msg = ("Supervisor requires Python 2.3 or later but does not work on "
  18. "any version of Python 3. You are using version %s. Please "
  19. "install using a supported version." % sys.version)
  20. sys.stderr.write(msg)
  21. sys.exit(1)
  22. import urllib
  23. import urllib2
  24. if not hasattr(urllib2, 'splituser'):
  25. # setuptools wants to import this from urllib2 but it's not
  26. # in there in Python 2.3.3, so we just alias it.
  27. urllib2.splituser = urllib.splituser
  28. requires = ['setuptools', 'meld3 >= 0.6.5']
  29. if sys.version_info[:2] < (2, 5):
  30. # for meld3 (it's a distutils package)
  31. requires.append('elementtree')
  32. from setuptools import setup, find_packages
  33. here = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
  34. try:
  35. here = os.path.abspath(os.path.dirname(__file__))
  36. README = open(os.path.join(here, 'README.rst')).read()
  37. CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
  38. except:
  39. README = """\
  40. Supervisor is a client/server system that allows its users to
  41. control a number of processes on UNIX-like operating systems. """
  42. CHANGES = ''
  43. CLASSIFIERS = [
  44. 'Development Status :: 5 - Production/Stable',
  45. 'Environment :: No Input/Output (Daemon)',
  46. 'Intended Audience :: System Administrators',
  47. 'Natural Language :: English',
  48. 'Operating System :: POSIX',
  49. 'Topic :: System :: Boot',
  50. 'Topic :: System :: Monitoring',
  51. 'Topic :: System :: Systems Administration',
  52. ]
  53. version_txt = os.path.join(here, 'supervisor/version.txt')
  54. supervisor_version = open(version_txt).read().strip()
  55. dist = setup(
  56. name = 'supervisor',
  57. version = supervisor_version,
  58. license = 'BSD-derived (http://www.repoze.org/LICENSE.txt)',
  59. url = 'http://supervisord.org/',
  60. description = "A system for controlling process state under UNIX",
  61. long_description=README + '\n\n' + CHANGES,
  62. classifiers = CLASSIFIERS,
  63. author = "Chris McDonough",
  64. author_email = "chrism@plope.com",
  65. maintainer = "Mike Naberezny",
  66. maintainer_email = "mike@naberezny.com",
  67. packages = find_packages(),
  68. install_requires = requires,
  69. extras_require = {'iterparse':['cElementTree >= 1.0.2']},
  70. tests_require = requires + ['mock >= 0.5.0'],
  71. include_package_data = True,
  72. zip_safe = False,
  73. namespace_packages = ['supervisor'],
  74. test_suite = "supervisor.tests",
  75. entry_points = {
  76. 'console_scripts': [
  77. 'supervisord = supervisor.supervisord:main',
  78. 'supervisorctl = supervisor.supervisorctl:main',
  79. 'echo_supervisord_conf = supervisor.confecho:main',
  80. 'pidproxy = supervisor.pidproxy:main',
  81. ],
  82. },
  83. )