setup.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. ],
  49. extras_require={
  50. "dev": [
  51. "flake8==3.9.2",
  52. "black==21.6b0",
  53. "isort==5.8.0",
  54. "mypy>=0.902",
  55. "mypy-zope>=0.3.1",
  56. "types-PyYAML",
  57. "types-mock",
  58. ],
  59. },
  60. # make sure we package the sql files
  61. include_package_data=True,
  62. long_description=read("README.rst"),
  63. )