setup.py 2.6KB

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