/setup.py

https://github.com/AnneGilles/deform · Python · 78 lines · 51 code · 9 blank · 18 comment · 4 complexity · fc5e43b346f7909d63d9dc02cc773599 MD5 · raw file

  1. ##############################################################################
  2. #
  3. # Copyright (c) 2011 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. import os
  15. import sys
  16. from setuptools import setup
  17. from setuptools import find_packages
  18. here = os.path.abspath(os.path.dirname(__file__))
  19. try:
  20. README = open(os.path.join(here, 'README.txt')).read()
  21. CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
  22. except:
  23. README = ''
  24. CHANGES = ''
  25. requires = [
  26. 'Chameleon>=1.2.3', # debug arg
  27. 'colander>=0.8', # Bindings-providing
  28. 'peppercorn>=0.3', # rename operation type
  29. 'translationstring',
  30. 'lingua', # if chameleon >= 2, for i18n message extraction
  31. ]
  32. if sys.version_info <(2,6,0):
  33. requires.append('simplejson')
  34. setupkw = dict(
  35. name='deform',
  36. version='0.9.3',
  37. description='Another form generation library',
  38. long_description=README + '\n\n' + CHANGES,
  39. classifiers=[
  40. "Intended Audience :: Developers",
  41. "Programming Language :: Python",
  42. ],
  43. keywords='web forms form generation schema validation',
  44. author="Chris McDonough, Agendaless Consulting",
  45. author_email="pylons-discuss@googlegroups.com",
  46. url="http://pylonsproject.org",
  47. license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
  48. packages=find_packages(),
  49. include_package_data=True,
  50. zip_safe=False,
  51. tests_require=requires + ['BeautifulSoup'],
  52. install_requires=requires,
  53. test_suite="deform",
  54. )
  55. try:
  56. import babel
  57. babel = babel # PyFlakes
  58. # if babel is installed, advertise message extractors (if we pass
  59. # this to setup() unconditionally, and babel isn't installed,
  60. # distutils warns pointlessly)
  61. setupkw['message_extractors'] = { ".": [
  62. #("deform/**.py", "chameleon_python", None ), #chameleon < 2
  63. #("deform/**.pt", "chameleon_xml", None ), #chameleon < 2
  64. ("deform/**.py", "lingua_python", None ), #chameleon >= 2
  65. ("deform/**.pt", "lingua_xml", None ), #chameleon >= 2
  66. ]}
  67. except ImportError:
  68. pass
  69. setup(**setupkw)