setup.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2014 OpenMarket Ltd.
  3. # Copyright 2018 New Vector Ltd.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. import re
  17. import os
  18. from setuptools import setup, find_packages
  19. def read_version():
  20. fn = os.path.join(os.path.dirname(__file__), 'sydent', '__init__.py')
  21. with open(fn) as fp:
  22. f = fp.read()
  23. return re.search(r"^__version__ = '(.*)'", f).group(1)
  24. # Utility function to read the README file.
  25. # Used for the long_description. It's nice, because now 1) we have a top level
  26. # README file and 2) it's easier to type in the README file than to put a raw
  27. # string in below ...
  28. def read(fname):
  29. return open(os.path.join(os.path.dirname(__file__), fname)).read()
  30. setup(
  31. name="matrix-sydent",
  32. version=read_version(),
  33. packages=find_packages(),
  34. description="Reference Matrix Identity Verification and Lookup Server",
  35. install_requires=[
  36. "signedjson==1.0.0",
  37. "unpaddedbase64==1.1.0",
  38. "Twisted>=16.0.0",
  39. # twisted warns about about the absence of this
  40. "service_identity>=1.0.0",
  41. "phonenumbers",
  42. "pyopenssl",
  43. "attrs>=19.1.0",
  44. "netaddr>=0.7.0",
  45. "sortedcontainers>=2.1.0",
  46. ],
  47. # make sure we package the sql files
  48. include_package_data=True,
  49. long_description=read("README.rst"),
  50. )