setup.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 2014 OpenMarket Ltd.
  2. # Copyright 2018 New Vector Ltd.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. import os
  16. import re
  17. from setuptools import find_packages, setup
  18. def read_version():
  19. fn = os.path.join(os.path.dirname(__file__), "sydent", "__init__.py")
  20. with open(fn) as fp:
  21. f = fp.read()
  22. return re.search(r'^__version__ = "(.*)"', f).group(1)
  23. # Utility function to read the README file.
  24. # Used for the long_description. It's nice, because now 1) we have a top level
  25. # README file and 2) it's easier to type in the README file than to put a raw
  26. # string in below ...
  27. def read(fname):
  28. return open(os.path.join(os.path.dirname(__file__), fname)).read()
  29. setup(
  30. name="matrix-sydent",
  31. version=read_version(),
  32. packages=find_packages(),
  33. description="Reference Matrix Identity Verification and Lookup Server",
  34. python_requires=">=3.6",
  35. install_requires=[
  36. "attrs>=19.1.0",
  37. "jinja2>=3.0.0",
  38. "netaddr>=0.7.0",
  39. "phonenumbers>=8.12.32",
  40. "PyNaCl>=1.2.1",
  41. "pyOpenSSL>=16.0.0",
  42. "pyyaml>=3.11",
  43. # twisted warns about about the absence of this
  44. "service_identity>=1.0.0",
  45. "signedjson==1.1.1",
  46. "sortedcontainers>=2.1.0",
  47. "Twisted>=18.4.0",
  48. "typing-extensions>=3.7.4",
  49. "unpaddedbase64>=1.1.0",
  50. "zope.interface>=4.6.0",
  51. ],
  52. extras_require={
  53. "dev": [
  54. "black==21.6b0",
  55. "flake8==3.9.2",
  56. "flake8-pyi==20.10.0",
  57. "isort==5.8.0",
  58. "mypy>=0.902",
  59. "mypy-zope>=0.3.1",
  60. "parameterized==0.8.1",
  61. "types-Jinja2",
  62. "types-mock",
  63. "types-PyOpenSSL",
  64. "types-PyYAML",
  65. ],
  66. },
  67. # make sure we package the sql files
  68. include_package_data=True,
  69. long_description=read("README.rst"),
  70. )