setup.py 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 Zope Public License,
  7. # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
  8. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
  9. # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  10. # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
  11. # 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. 'License :: OSI Approved :: Zope Public License',
  42. 'Natural Language :: English',
  43. 'Operating System :: POSIX',
  44. 'Topic :: System :: Boot',
  45. 'Topic :: System :: Monitoring',
  46. 'Topic :: System :: Systems Administration',
  47. ]
  48. version_txt = os.path.join(here, 'src/supervisor/version.txt')
  49. supervisor_version = open(version_txt).read().strip()
  50. dist = setup(
  51. name = 'supervisor',
  52. version = supervisor_version,
  53. license = 'ZPL 2.1/others (see LICENSES.txt)',
  54. url = 'http://www.plope.com/software/supervisor2/',
  55. description = "A system for controlling process state under UNIX",
  56. long_description= DESC,
  57. classifiers = CLASSIFIERS,
  58. author = "Chris McDonough",
  59. author_email = "chrism@plope.com",
  60. maintainer = "Chris McDonough",
  61. maintainer_email = "chrism@plope.com",
  62. package_dir = {'':'src'},
  63. packages = find_packages(os.path.join(here, 'src')),
  64. # put data files in egg 'doc' dir
  65. data_files=[ ('doc', ['sample.conf', 'README.txt', 'UPGRADING.txt',
  66. 'CHANGES.txt', 'TODO.txt', 'LICENSES.txt',
  67. 'COPYRIGHT.txt'])],
  68. install_requires = ['medusa >= 0.5.4', 'meld3 >= 0.6.3',
  69. 'elementtree >= 1.2.6'],
  70. include_package_data = True,
  71. zip_safe = False,
  72. namespace_packages = ['supervisor'],
  73. test_suite = "supervisor.tests",
  74. entry_points = {
  75. 'supervisor_rpc':['main = supervisor.rpcinterface:make_main_rpcinterface'],
  76. 'console_scripts': [
  77. 'supervisord = supervisor.supervisord:main',
  78. 'supervisorctl = supervisor.supervisorctl:main',
  79. ],
  80. },
  81. )