setup.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/usr/bin/env python3
  2. # This file is part of Radicale - CalDAV and CardDAV server
  3. # Copyright © 2009-2017 Guillaume Ayoub
  4. # Copyright © 2017-2018 Unrud <unrud@outlook.com>
  5. #
  6. # This library is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This library is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with Radicale. If not, see <http://www.gnu.org/licenses/>.
  18. """
  19. Radicale CalDAV and CardDAV server
  20. ==================================
  21. The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It
  22. aims to be a light solution, easy to use, easy to install, easy to configure.
  23. As a consequence, it requires few software dependances and is pre-configured to
  24. work out-of-the-box.
  25. The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD,
  26. MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone
  27. and Android clients. It is free and open-source software, released under GPL
  28. version 3.
  29. For further information, please visit the `Radicale Website
  30. <https://radicale.org/>`_.
  31. """
  32. import os
  33. import sys
  34. from setuptools import find_packages, setup
  35. # When the version is updated, a new section in the CHANGELOG.md file must be
  36. # added too.
  37. VERSION = "master"
  38. WEB_FILES = ["web/internal_data/css/icon.png",
  39. "web/internal_data/css/main.css",
  40. "web/internal_data/fn.js",
  41. "web/internal_data/index.html"]
  42. install_requires = ["defusedxml", "passlib", "vobject>=0.9.6",
  43. "python-dateutil>=2.7.3"]
  44. if sys.version_info < (3, 9):
  45. install_requires.append("setuptools")
  46. setup_requires = []
  47. if {"pytest", "test", "ptr"}.intersection(sys.argv):
  48. setup_requires.append("pytest-runner")
  49. tests_require = ["pytest-runner", "pytest<7", "pytest-cov", "pytest-flake8",
  50. "pytest-isort", "typeguard", "waitress"]
  51. os.environ["PYTEST_ADDOPTS"] = os.environ.get("PYTEST_ADDOPTS", "")
  52. # Mypy only supports CPython
  53. if sys.implementation.name == "cpython":
  54. tests_require.extend(["pytest-mypy", "types-setuptools"])
  55. os.environ["PYTEST_ADDOPTS"] += " --mypy"
  56. setup(
  57. name="Radicale",
  58. version=VERSION,
  59. description="CalDAV and CardDAV Server",
  60. long_description=__doc__,
  61. author="Guillaume Ayoub",
  62. author_email="guillaume.ayoub@kozea.fr",
  63. url="https://radicale.org/",
  64. download_url=("https://pypi.python.org/packages/source/R/Radicale/"
  65. "Radicale-%s.tar.gz" % VERSION),
  66. license="GNU GPL v3",
  67. platforms="Any",
  68. packages=find_packages(
  69. exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
  70. package_data={"radicale": [*WEB_FILES, "py.typed"]},
  71. entry_points={"console_scripts": ["radicale = radicale.__main__:run"]},
  72. install_requires=install_requires,
  73. setup_requires=setup_requires,
  74. tests_require=tests_require,
  75. extras_require={"test": tests_require,
  76. "bcrypt": ["passlib[bcrypt]", "bcrypt"]},
  77. keywords=["calendar", "addressbook", "CalDAV", "CardDAV"],
  78. python_requires=">=3.6.0",
  79. classifiers=[
  80. "Development Status :: 5 - Production/Stable",
  81. "Environment :: Console",
  82. "Environment :: Web Environment",
  83. "Intended Audience :: End Users/Desktop",
  84. "Intended Audience :: Information Technology",
  85. "License :: OSI Approved :: GNU General Public License (GPL)",
  86. "Operating System :: OS Independent",
  87. "Programming Language :: Python :: 3",
  88. "Programming Language :: Python :: 3.6",
  89. "Programming Language :: Python :: 3.7",
  90. "Programming Language :: Python :: 3.8",
  91. "Programming Language :: Python :: 3.9",
  92. "Programming Language :: Python :: 3.10",
  93. "Programming Language :: Python :: Implementation :: CPython",
  94. "Programming Language :: Python :: Implementation :: PyPy",
  95. "Topic :: Office/Business :: Groupware"])