setup.py 2.9KB

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