setup.py 2.7KB

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