From 8e780b113d1223994bf77a5075e91ff56dd20f67 Mon Sep 17 00:00:00 2001 From: Matthew Wolff Date: Mon, 17 Apr 2017 00:44:05 -0500 Subject: [PATCH 1/3] web_server_root documentation fix Signed-off-by: Matthew Wolff --- README.rst | 7 +++++-- synapse/app/homeserver.py | 3 +-- synapse/config/server.py | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 759197f5ff..8de7cd3f3b 100644 --- a/README.rst +++ b/README.rst @@ -335,8 +335,11 @@ ArchLinux --------- The quickest way to get up and running with ArchLinux is probably with the community package -https://www.archlinux.org/packages/community/any/matrix-synapse/, which should pull in all -the necessary dependencies. +https://www.archlinux.org/packages/community/any/matrix-synapse/, which should pull in most of +the necessary dependencies. If the default web client is to be served (enabled by default in +the generated config), +https://www.archlinux.org/packages/community/any/python2-matrix-angular-sdk/ will also need to +be installed. Alternatively, to install using pip a few changes may be needed as ArchLinux defaults to python 3, but synapse currently assumes python 2.7 by default: diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 6f5924d2c7..c9521a10fb 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -88,11 +88,10 @@ def build_resource_for_web_client(hs): "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + " pip install matrix-angular-sdk\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") diff --git a/synapse/config/server.py b/synapse/config/server.py index 1f9999d57a..25e6666238 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -144,6 +144,12 @@ class ServerConfig(Config): # Whether to serve a web client from the HTTP/HTTPS root resource. web_client: True + # The root directory to server for the above web client. + # If left undefined, synapse will serve the matrix-angular-sdk web client. + # Make sure matrix-angular-sdk is installed with pip if web_client is True + # and web_client_location is undefined + # web_client_location: "/path/to/web/root" + # The public-facing base URL for the client API (not including _matrix/...) # public_baseurl: https://example.com:8448/ From 54f9a4cb59e358941b0b410633cd568b79f3e393 Mon Sep 17 00:00:00 2001 From: Matthew Wolff Date: Mon, 17 Apr 2017 01:38:27 -0500 Subject: [PATCH 2/3] Fixed travis build failure Signed-off-by: Matthew Wolff --- synapse/app/homeserver.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index c9521a10fb..56f97ea845 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -24,9 +24,7 @@ import sys import synapse.config.logger from synapse.config._base import ConfigError -from synapse.python_dependencies import ( - check_requirements, DEPENDENCY_LINKS -) +from synapse.python_dependencies import check_requirements from synapse.rest import ClientRestResource from synapse.storage.engines import create_engine, IncorrectDatabaseSetup From d4040e9e284b413ceecdbe927ff3be02a1aa9b70 Mon Sep 17 00:00:00 2001 From: Matthew Wolff Date: Tue, 18 Apr 2017 16:19:48 -0500 Subject: [PATCH 3/3] Queried CONDITIONAL_REQUIREMENTS --- synapse/app/homeserver.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 56f97ea845..3457402596 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -24,7 +24,9 @@ import sys import synapse.config.logger from synapse.config._base import ConfigError -from synapse.python_dependencies import check_requirements +from synapse.python_dependencies import ( + check_requirements, CONDITIONAL_REQUIREMENTS +) from synapse.rest import ClientRestResource from synapse.storage.engines import create_engine, IncorrectDatabaseSetup @@ -86,10 +88,11 @@ def build_resource_for_web_client(hs): "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install matrix-angular-sdk\n" + " pip install '%(dep)s'\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" + % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient")