setup.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.1.1",
  37. "unpaddedbase64==1.1.0",
  38. # We require defer.Deferred.addTimeout, which was introduced in 16.5
  39. "Twisted>=16.5.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. "six>=1.10",
  48. "pyyaml>=3.11",
  49. "mock>=3.0.5",
  50. "pynacl",
  51. "pyyaml",
  52. "netaddr",
  53. "six>=1.10",
  54. ],
  55. # make sure we package the sql files
  56. include_package_data=True,
  57. long_description=read("README.rst"),
  58. )