setup.py 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##############################################################################
  2. #
  3. # Copyright (c) 2007 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. __revision__ = '$Id$'
  15. import urllib
  16. import urllib2
  17. if not hasattr(urllib2, 'splituser'):
  18. # setuptools wants to import this from urllib2 but it's not
  19. # in there in Python 2.3.3, so we just alias it.
  20. urllib2.splituser = urllib.splituser
  21. from ez_setup import use_setuptools
  22. use_setuptools()
  23. import os
  24. import sys
  25. if sys.version_info[:2] < (2, 3):
  26. msg = ("supervisor requires Python 2.3 or better, you are attempting to "
  27. "install it using version %s. Please install with a "
  28. "supported version" % sys.version)
  29. sys.stderr.write(msg)
  30. sys.exit(1)
  31. requires = ['meld3 >= 0.6.5']
  32. if sys.version_info[:2] < (2, 5):
  33. # for meld3 (its a distutils package)
  34. requires.append('elementtree')
  35. from setuptools import setup, find_packages
  36. here = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
  37. DESC = """\
  38. Supervisor is a client/server system that allows its users to
  39. control a number of processes on UNIX-like operating systems. """
  40. CLASSIFIERS = [
  41. 'Development Status :: 5 - Production/Stable',
  42. 'Environment :: No Input/Output (Daemon)',
  43. 'Intended Audience :: System Administrators',
  44. 'Natural Language :: English',
  45. 'Operating System :: POSIX',
  46. 'Topic :: System :: Boot',
  47. 'Topic :: System :: Monitoring',
  48. 'Topic :: System :: Systems Administration',
  49. ]
  50. version_txt = os.path.join(here, 'src/supervisor/version.txt')
  51. supervisor_version = open(version_txt).read().strip()
  52. dist = setup(
  53. name = 'supervisor',
  54. version = supervisor_version,
  55. license = 'BSD-derived (http://www.repoze.org/LICENSE.txt)',
  56. url = 'http://supervisord.org/',
  57. download_url = 'http://dist.supervisord.org/',
  58. description = "A system for controlling process state under UNIX",
  59. long_description= DESC,
  60. classifiers = CLASSIFIERS,
  61. author = "Chris McDonough",
  62. author_email = "chrism@plope.com",
  63. maintainer = "Chris McDonough",
  64. maintainer_email = "chrism@plope.com",
  65. package_dir = {'':'src'},
  66. packages = find_packages(os.path.join(here, 'src')),
  67. # put data files in egg 'doc' dir
  68. data_files=[ ('doc', [
  69. 'README.txt',
  70. 'CHANGES.txt',
  71. 'TODO.txt',
  72. 'LICENSES.txt',
  73. 'COPYRIGHT.txt'
  74. ]
  75. )],
  76. install_requires = requires,
  77. extras_require = {'iterparse':['cElementTree >= 1.0.2']},
  78. tests_require = requires,
  79. include_package_data = True,
  80. zip_safe = False,
  81. namespace_packages = ['supervisor'],
  82. test_suite = "supervisor.tests",
  83. entry_points = {
  84. 'supervisor_rpc':['main = supervisor.rpcinterface:make_main_rpcinterface'],
  85. 'console_scripts': [
  86. 'supervisord = supervisor.supervisord:main',
  87. 'supervisorctl = supervisor.supervisorctl:main',
  88. 'echo_supervisord_conf = supervisor.confecho:main',
  89. 'pidproxy = supervisor.pidproxy:main',
  90. ],
  91. },
  92. )