setup.py 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. import string
  26. version, extra = string.split(sys.version, ' ', 1)
  27. maj, minor = string.split(version, '.', 1)
  28. if not maj[0] >= '2' and minor[0] >= '3':
  29. msg = ("supervisor requires Python 2.3 or better, you are attempting to "
  30. "install it using version %s. Please install with a "
  31. "supported version" % version)
  32. from setuptools import setup, find_packages
  33. here = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
  34. DESC = """\
  35. Supervisor is a client/server system that allows its users to
  36. control a number of processes on UNIX-like operating systems. """
  37. CLASSIFIERS = [
  38. 'Development Status :: 5 - Production/Stable',
  39. 'Environment :: No Input/Output (Daemon)',
  40. 'Intended Audience :: System Administrators',
  41. 'Natural Language :: English',
  42. 'Operating System :: POSIX',
  43. 'Topic :: System :: Boot',
  44. 'Topic :: System :: Monitoring',
  45. 'Topic :: System :: Systems Administration',
  46. ]
  47. version_txt = os.path.join(here, 'src/supervisor/version.txt')
  48. supervisor_version = open(version_txt).read().strip()
  49. dist = setup(
  50. name = 'supervisor',
  51. version = supervisor_version,
  52. license = 'BSD-derived (http://www.repoze.org/LICENSE.txt)',
  53. url = 'http://www.plope.com/software/supervisor2/',
  54. description = "A system for controlling process state under UNIX",
  55. long_description= DESC,
  56. classifiers = CLASSIFIERS,
  57. author = "Chris McDonough",
  58. author_email = "chrism@plope.com",
  59. maintainer = "Chris McDonough",
  60. maintainer_email = "chrism@plope.com",
  61. package_dir = {'':'src'},
  62. packages = find_packages(os.path.join(here, 'src')),
  63. # put data files in egg 'doc' dir
  64. data_files=[ ('doc', ['sample.conf', 'README.txt', 'UPGRADING.txt',
  65. 'CHANGES.txt', 'TODO.txt', 'LICENSES.txt',
  66. 'COPYRIGHT.txt'])],
  67. install_requires = ['medusa >= 0.5.4', 'meld3 >= 0.6.3',
  68. 'elementtree >= 1.2.6,<1.2.7'],
  69. extras_require = {'iterparse':['cElementTree >= 1.0.2']},
  70. tests_require = ['meld3 >= 0.6.3', 'medusa >= 0.5.4'],
  71. include_package_data = True,
  72. zip_safe = False,
  73. namespace_packages = ['supervisor'],
  74. test_suite = "supervisor.tests",
  75. entry_points = {
  76. 'supervisor_rpc':['main = supervisor.rpcinterface:make_main_rpcinterface'],
  77. 'console_scripts': [
  78. 'supervisord = supervisor.supervisord:main',
  79. 'supervisorctl = supervisor.supervisorctl:main',
  80. ],
  81. },
  82. )