setup.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. __revision__ = '$Id$'
  2. import sys
  3. import string
  4. version, extra = string.split(sys.version, ' ', 1)
  5. maj, minor = string.split(version, '.', 1)
  6. if not maj[0] >= '2' and minor[0] >= '3':
  7. msg = ("supervisor requires Python 2.3 or better, you are attempting to "
  8. "install it using version %s. Please install with a "
  9. "supported version" % version)
  10. from distutils.core import setup
  11. DESC = """\
  12. Supervisor is a client/server system that allows its users to
  13. control a number of processes on UNIX-like operating systems. """
  14. CLASSIFIERS = [
  15. 'Development Status :: 5 - Production/Stable',
  16. 'Environment :: No Input/Output (Daemon)',
  17. 'Intended Audience :: System Administrators',
  18. 'License :: OSI Approved :: Zope Public License',
  19. 'Natural Language :: English',
  20. 'Operating System :: POSIX',
  21. 'Topic :: System :: Boot',
  22. 'Topic :: System :: Systems Administration',
  23. ]
  24. from options import VERSION
  25. dist = setup(
  26. name = 'supervisor',
  27. version = VERSION,
  28. license = 'ZPL/BSD (see LICENSES.txt)',
  29. url = 'http://www.plope.com/software',
  30. description = "A system for controlling process state under UNIX",
  31. long_description= DESC,
  32. platform = 'UNIX',
  33. classifiers = CLASSIFIERS,
  34. author = "Chris McDonough",
  35. author_email = "chrism@plope.com",
  36. maintainer = "Chris McDonough",
  37. maintainer_email = "chrism@plope.com",
  38. scripts=['supervisord', 'supervisorctl'],
  39. packages = ['supervisor', 'supervisor.medusa', 'supervisor.meld3',
  40. 'supervisor.meld3.elementtree'],
  41. package_dir = {'supervisor':'.'},
  42. # package_data doesn't work under 2.3
  43. package_data= {'supervisor':['ui/*.gif', 'ui/*.css', 'ui/*.html']},
  44. )
  45. if __name__ == '__main__':
  46. # if pre-2.4 distutils was a joke, i suspect nobody laughed
  47. if minor[0] <= '3':
  48. if 'install' in sys.argv:
  49. from distutils import dir_util
  50. import os
  51. pkg_dir = dist.command_obj['install'].install_purelib
  52. for dirname in ['ui']:
  53. dir_util.copy_tree(
  54. os.path.join(dirname),
  55. os.path.join(pkg_dir, 'supervisor', dirname)
  56. )