summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-10 11:16:26 +0100
committerErik Johnston <erik@matrix.org>2019-10-10 11:16:26 +0100
commit128d5948c4e0066f1263b347198f4754e72010c8 (patch)
tree66a1975fd8f20ed1a7c665445dcd18ebbd5378b3 /synapse
parentLog correct context (diff)
downloadsynapse-128d5948c4e0066f1263b347198f4754e72010c8.tar.xz
Fix packaging
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index bf102244a9..56df3f5ac6 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -20,8 +20,6 @@
 import os
 import sys
 
-from synapse.util.patch_inline_callbacks import do_patch
-
 # Check that we're not running on an unsupported Python version.
 if sys.version_info < (3, 5):
     print("Synapse requires Python 3.5 or above.")
@@ -41,4 +39,8 @@ except ImportError:
 __version__ = "1.4.0"
 
 if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
+    # We import here so that we don't have to install a bunch of deps when
+    # running the packaging tox test.
+    from synapse.util.patch_inline_callbacks import do_patch
+
     do_patch()