setup.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. "six>=1.10",
  47. "pyyaml>=3.11",
  48. ],
  49. # make sure we package the sql files
  50. include_package_data=True,
  51. long_description=read("README.rst"),
  52. )