setup.py 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. # frontend file serve
  42. 'pyramid_mako',
  43. ]
  44. tests_require = [
  45. 'WebTest >= 1.3.1', # py3 compat
  46. 'pytest',
  47. 'pytest-cov',
  48. 'pep8',
  49. 'mypy',
  50. 'requests',
  51. 'Pillow'
  52. ]
  53. mysql_require = [
  54. 'PyMySQL'
  55. ]
  56. postgresql_require = [
  57. 'psycopg2',
  58. ]
  59. # Python version adaptations
  60. if sys.version_info < (3, 5):
  61. requires.append('typing')
  62. setup(
  63. name='tracim_backend',
  64. version='1.9.1',
  65. description='Rest API (Back-end) of Tracim v2',
  66. long_description=README + '\n\n' + CHANGES,
  67. classifiers=[
  68. 'Development Status :: 2 - Pre-Alpha',
  69. 'Programming Language :: Python',
  70. "Programming Language :: Python :: 3.4",
  71. "Programming Language :: Python :: 3.5",
  72. "Programming Language :: Python :: 3.6",
  73. 'Framework :: Pyramid',
  74. 'Topic :: Internet :: WWW/HTTP',
  75. 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
  76. 'Topic :: Communications :: File Sharing',
  77. 'Topic :: Communications',
  78. 'License :: OSI Approved :: MIT License',
  79. ],
  80. author='',
  81. author_email='',
  82. url='https://github.com/tracim/tracim_backend',
  83. keywords='web pyramid tracim ',
  84. packages=find_packages(),
  85. include_package_data=True,
  86. zip_safe=False,
  87. extras_require={
  88. 'testing': tests_require,
  89. 'mysql': mysql_require,
  90. 'postgresql': postgresql_require,
  91. },
  92. install_requires=requires,
  93. entry_points={
  94. 'paste.app_factory': [
  95. 'main = tracim_backend:web',
  96. 'webdav = tracim_backend:webdav'
  97. ],
  98. 'console_scripts': [
  99. 'tracimcli = tracim_backend.command:main',
  100. ],
  101. 'tracimcli': [
  102. 'test = tracim_backend.command:TestTracimCommand',
  103. 'user_create = tracim_backend.command.user:CreateUserCommand',
  104. 'user_update = tracim_backend.command.user:UpdateUserCommand',
  105. 'db_init = tracim_backend.command.database:InitializeDBCommand',
  106. 'db_delete = tracim_backend.command.database:DeleteDBCommand',
  107. 'webdav start = tracim_backend.command.webdav:WebdavRunnerCommand',
  108. ]
  109. },
  110. )