From 72d434956ab4093ef434e0342a24d4a399c5f245 Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Thu, 26 Mar 2020 12:01:05 -0700 Subject: [PATCH] Add setup.py for easier install (No need to figure out paths) --- README.md | 14 ++------------ setup.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 setup.py diff --git a/README.md b/README.md index 48de92d..ddf1a24 100644 --- a/README.md +++ b/README.md @@ -21,22 +21,12 @@ your own backend, following the [Integration section](#integrate). This module s and profile information into actionables in synapse, and adapt your user profile with what is given. ## Install -### From Synapse v0.34.0/py3 -Copy in whichever directory python3.x can pick it up as a module. +Copy in whichever directory python can pick it up as a module. -If you installed synapse using the Matrix debian repos: ``` -sudo curl https://raw.githubusercontent.com/ma1uta/matrix-synapse-rest-password-provider/master/rest_auth_provider.py -o /opt/venvs/matrix-synapse/lib/python3.7/site-packages/rest_auth_provider.py +sudo pip install git+https://github.com/ma1uta/matrix-synapse-rest-password-provider ``` -If the command fail, double check that the python version still matches. If not, please let us know by opening an issue. - -### Before Synapse v0.34.0/py3 or any py2-based release -Copy in whichever directory python2.x can pick it up as a module. -If you installed synapse using the Matrix debian repos: -``` -sudo curl https://raw.githubusercontent.com/ma1uta/matrix-synapse-rest-password-provider/master/rest_auth_provider.py -o /usr/lib/python2.7/dist-packages/rest_auth_provider.py -``` If the command fail, double check that the python version still matches. If not, please let us know by opening an issue. ## Configure diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..96bde8d --- /dev/null +++ b/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup + +setup( + name="rest_auth_provider", + version="0.0.1", + py_modules=['rest_auth_provider'], + description="Password Provider for Synapse fetching data from a REST endpoint", + include_package_data=True, + zip_safe=True, + install_requires=[], +) +