setup.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. dist = setup(
  25. name = 'supervisor',
  26. version = "2.1b1",
  27. license = 'ZPL/BSD (see LICENSES.txt)',
  28. url = 'http://www.plope.com/software',
  29. description = "A system for controlling process state under UNIX",
  30. long_description= DESC,
  31. platform = 'UNIX',
  32. classifiers = CLASSIFIERS,
  33. author = "Chris McDonough",
  34. author_email = "chrism@plope.com",
  35. maintainer = "Chris McDonough",
  36. maintainer_email = "chrism@plope.com",
  37. scripts=['supervisord', 'supervisorctl'],
  38. packages = ['supervisor', 'supervisor.medusa', 'supervisor.meld3',
  39. 'supervisor.meld3.elementtree'],
  40. package_dir = {'supervisor':'.'},
  41. # package_data doesn't work under 2.3
  42. package_data= {'supervisor':['ui/*.gif', 'ui/*.css', 'ui/*.html']},
  43. )
  44. if __name__ == '__main__':
  45. # if pre-2.4 distutils was a joke, i suspect nobody laughed
  46. if minor[0] <= '3':
  47. if 'install' in sys.argv:
  48. from distutils import dir_util
  49. import os
  50. pkg_dir = dist.command_obj['install'].install_purelib
  51. for dirname in ['ui']:
  52. dir_util.copy_tree(
  53. os.path.join(dirname),
  54. os.path.join(pkg_dir, 'supervisor', dirname)
  55. )