setup.py 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import os
  2. import sys
  3. from setuptools import setup, find_packages
  4. here = os.path.abspath(os.path.dirname(__file__))
  5. with open(os.path.join(here, 'README.md')) as f:
  6. README = f.read()
  7. with open(os.path.join(here, 'CHANGES.txt')) as f:
  8. CHANGES = f.read()
  9. requires = [
  10. # pyramid
  11. 'plaster_pastedeploy',
  12. 'pyramid >= 1.9a',
  13. 'pyramid_debugtoolbar',
  14. 'pyramid_jinja2',
  15. 'pyramid_retry',
  16. 'waitress',
  17. # Database
  18. 'pyramid_tm',
  19. 'SQLAlchemy',
  20. 'transaction',
  21. 'zope.sqlalchemy',
  22. 'alembic',
  23. # API
  24. 'hapic>=0.41',
  25. 'marshmallow <3.0.0a1,>2.0.0',
  26. # CLI
  27. 'cliff',
  28. # Webdav
  29. 'wsgidav',
  30. 'PyYAML',
  31. # others
  32. 'filedepot',
  33. 'babel',
  34. 'python-slugify',
  35. 'preview-generator',
  36. # mail-notifier
  37. 'mako',
  38. 'lxml',
  39. 'redis',
  40. 'rq',
  41. ]
  42. tests_require = [
  43. 'WebTest >= 1.3.1', # py3 compat
  44. 'pytest',
  45. 'pytest-cov',
  46. 'pep8',
  47. 'mypy',
  48. 'requests',
  49. 'Pillow'
  50. ]
  51. mysql_require = [
  52. 'PyMySQL'
  53. ]
  54. postgresql_require = [
  55. 'psycopg2',
  56. ]
  57. # Python version adaptations
  58. if sys.version_info < (3, 5):
  59. requires.append('typing')
  60. setup(
  61. name='tracim_backend',
  62. version='1.9.1',
  63. description='Rest API (Back-end) of Tracim v2',
  64. long_description=README + '\n\n' + CHANGES,
  65. classifiers=[
  66. 'Development Status :: 2 - Pre-Alpha',
  67. 'Programming Language :: Python',
  68. "Programming Language :: Python :: 3.4",
  69. "Programming Language :: Python :: 3.5",
  70. "Programming Language :: Python :: 3.6",
  71. 'Framework :: Pyramid',
  72. 'Topic :: Internet :: WWW/HTTP',
  73. 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
  74. 'Topic :: Communications :: File Sharing',
  75. 'Topic :: Communications',
  76. 'License :: OSI Approved :: MIT License',
  77. ],
  78. author='',
  79. author_email='',
  80. url='https://github.com/tracim/tracim_backend',
  81. keywords='web pyramid tracim ',
  82. packages=find_packages(),
  83. include_package_data=True,
  84. zip_safe=False,
  85. extras_require={
  86. 'testing': tests_require,
  87. 'mysql': mysql_require,
  88. 'postgresql': postgresql_require,
  89. },
  90. install_requires=requires,
  91. entry_points={
  92. 'paste.app_factory': [
  93. 'main = tracim_backend:web',
  94. 'webdav = tracim_backend:webdav'
  95. ],
  96. 'console_scripts': [
  97. 'tracimcli = tracim_backend.command:main',
  98. ],
  99. 'tracimcli': [
  100. 'test = tracim_backend.command:TestTracimCommand',
  101. 'user_create = tracim_backend.command.user:CreateUserCommand',
  102. 'user_update = tracim_backend.command.user:UpdateUserCommand',
  103. 'db_init = tracim_backend.command.database:InitializeDBCommand',
  104. 'db_delete = tracim_backend.command.database:DeleteDBCommand',
  105. 'webdav start = tracim_backend.command.webdav:WebdavRunnerCommand',
  106. ]
  107. },
  108. )