/scripts/scramble/patches/PasteScript/setup.py

https://bitbucket.org/cistrome/cistrome-harvard/ · Python · 145 lines · 137 code · 5 blank · 3 comment · 4 complexity · 6112f1e7a4e2c0f17c72022b4377da64 MD5 · raw file

  1. import ez_setup
  2. ez_setup.use_setuptools()
  3. from setuptools import setup, find_packages
  4. import re, os
  5. version = '1.7.3'
  6. news = os.path.join(os.path.dirname(__file__), 'docs', 'news.txt')
  7. news = open(news).read()
  8. parts = re.split(r'([0-9\.]+)\s*\n\r?-+\n\r?', news)
  9. found_news = ''
  10. for i in range(len(parts)-1):
  11. if parts[i] == version:
  12. found_news = parts[i+i]
  13. break
  14. if not found_news:
  15. print 'Warning: no news for this version found'
  16. long_description="""\
  17. This is a pluggable command-line tool.
  18. It includes some built-in features;
  19. * Create file layouts for packages. For instance, ``paste create
  20. --template=basic_package MyPackage`` will create a `setuptools
  21. <http://peak.telecommunity.com/DevCenter/setuptools>`_-ready
  22. file layout.
  23. * Serving up web applications, with configuration based on
  24. `paste.deploy <http://pythonpaste.org/deploy/paste-deploy.html>`_.
  25. The latest version is available in a `Subversion repository
  26. <http://svn.pythonpaste.org/Paste/Script/trunk#egg=PasteScript-dev>`_.
  27. For the latest changes see the `news file
  28. <http://pythonpaste.org/script/news.html>`_.
  29. """
  30. if found_news:
  31. title = 'Changes in %s' % version
  32. long_description += "\n%s\n%s\n" % (title, '-'*len(title))
  33. long_description += found_news
  34. setup(
  35. name="PasteScript",
  36. version=version,
  37. description="A pluggable command-line frontend, including commands to setup package file layouts",
  38. long_description=long_description,
  39. classifiers=[
  40. "Development Status :: 5 - Production/Stable",
  41. "Intended Audience :: Developers",
  42. "License :: OSI Approved :: MIT License",
  43. "Programming Language :: Python",
  44. "Topic :: Internet :: WWW/HTTP",
  45. "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
  46. "Topic :: Software Development :: Libraries :: Python Modules",
  47. "Framework :: Paste",
  48. ],
  49. keywords='web wsgi setuptools framework command-line setup',
  50. author="Ian Bicking",
  51. author_email="ianb@colorstudy.com",
  52. url="http://pythonpaste.org/script/",
  53. namespace_packages=['paste'],
  54. license='MIT',
  55. packages=find_packages(exclude='tests'),
  56. package_data={
  57. 'paste.script': ['paster-templates/basic_package/setup.*',
  58. 'paster-templates/basic_package/tests/*.py',
  59. # @@: docs/ doesn't have any files :(
  60. 'paster-templates/basic_package/+package+/*.py'],
  61. },
  62. zip_safe=False,
  63. scripts=['scripts/paster'],
  64. extras_require={
  65. 'Templating': [],
  66. 'Cheetah': ['Cheetah'],
  67. 'Config': ['PasteDeploy'],
  68. 'WSGIUtils': ['WSGIUtils'],
  69. 'Flup': ['Flup'],
  70. # the Paste feature means the complete set of features;
  71. # (other features are truly optional)
  72. 'Paste': ['PasteDeploy', 'Cheetah'],
  73. },
  74. entry_points="""
  75. [paste.global_paster_command]
  76. help=paste.script.help:HelpCommand
  77. create=paste.script.create_distro:CreateDistroCommand [Templating]
  78. serve=paste.script.serve:ServeCommand [Config]
  79. request=paste.script.request:RequestCommand [Config]
  80. post=paste.script.request:RequestCommand [Config]
  81. exe=paste.script.exe:ExeCommand
  82. points=paste.script.entrypoints:EntryPointCommand
  83. make-config=paste.script.appinstall:MakeConfigCommand
  84. setup-app=paste.script.appinstall:SetupCommand
  85. [paste.paster_command]
  86. grep = paste.script.grep:GrepCommand
  87. [paste.paster_create_template]
  88. basic_package=paste.script.templates:BasicPackage
  89. [paste.server_runner]
  90. wsgiutils=paste.script.wsgiutils_server:run_server [WSGIUtils]
  91. flup_ajp_thread=paste.script.flup_server:run_ajp_thread [Flup]
  92. flup_ajp_fork=paste.script.flup_server:run_ajp_fork [Flup]
  93. flup_fcgi_thread=paste.script.flup_server:run_fcgi_thread [Flup]
  94. flup_fcgi_fork=paste.script.flup_server:run_fcgi_fork [Flup]
  95. flup_scgi_thread=paste.script.flup_server:run_scgi_thread [Flup]
  96. flup_scgi_fork=paste.script.flup_server:run_scgi_fork [Flup]
  97. cgi=paste.script.cgi_server:paste_run_cgi
  98. cherrypy=paste.script.cherrypy_server:cpwsgi_server
  99. twisted=paste.script.twisted_web2_server:run_twisted
  100. [paste.app_factory]
  101. test=paste.script.testapp:make_test_application
  102. [paste.entry_point_description]
  103. paste.entry_point_description = paste.script.epdesc:MetaEntryPointDescription
  104. paste.paster_create_template = paste.script.epdesc:CreateTemplateDescription
  105. paste.paster_command = paste.script.epdesc:PasterCommandDescription
  106. paste.global_paster_command = paste.script.epdesc:GlobalPasterCommandDescription
  107. paste.app_install = paste.script.epdesc:AppInstallDescription
  108. # These aren't part of Paste Script particularly, but
  109. # we'll document them here
  110. console_scripts = paste.script.epdesc:ConsoleScriptsDescription
  111. # @@: Need non-console scripts...
  112. distutils.commands = paste.script.epdesc:DistutilsCommandsDescription
  113. distutils.setup_keywords = paste.script.epdesc:SetupKeywordsDescription
  114. egg_info.writers = paste.script.epdesc:EggInfoWriters
  115. # @@: Not sure what this does:
  116. #setuptools.file_finders = paste.script.epdesc:SetuptoolsFileFinders
  117. [console_scripts]
  118. paster=paste.script.command:run
  119. [distutils.setup_keywords]
  120. paster_plugins = setuptools.dist:assert_string_list
  121. [egg_info.writers]
  122. paster_plugins.txt = setuptools.command.egg_info:write_arg
  123. """,
  124. install_requires=[
  125. ],
  126. )