setup.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. "jinja2>=3.0.0",
  37. "signedjson==1.1.1",
  38. "unpaddedbase64==1.1.0",
  39. "Twisted>=18.4.0",
  40. # twisted warns about about the absence of this
  41. "service_identity>=1.0.0",
  42. "phonenumbers",
  43. "pyopenssl",
  44. "attrs>=19.1.0",
  45. "netaddr>=0.7.0",
  46. "sortedcontainers>=2.1.0",
  47. "pyyaml>=3.11",
  48. "flake8==3.9.2",
  49. "black==21.6b0",
  50. "isort==5.8.0",
  51. "mypy>=0.902",
  52. "mypy-zope>=0.3.1",
  53. "types-PyYAML",
  54. "types-mock",
  55. ],
  56. # make sure we package the sql files
  57. include_package_data=True,
  58. long_description=read("README.rst"),
  59. )