From e9cdfedff3a3dd4b6d60187561d0538cdc2ac519 Mon Sep 17 00:00:00 2001
From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Date: Wed, 2 Jan 2019 07:30:31 +0000
Subject: [PATCH] Avoid packaging _trial_temp directory (#4326)

Make sure we don't put the _trial_temp directory in the package target
directory.

Fixes https://github.com/matrix-org/synapse/issues/4322
---
 changelog.d/4326.bugfix | 2 ++
 debian/build_virtualenv | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 changelog.d/4326.bugfix

diff --git a/changelog.d/4326.bugfix b/changelog.d/4326.bugfix
new file mode 100644
index 0000000000..acce6266b8
--- /dev/null
+++ b/changelog.d/4326.bugfix
@@ -0,0 +1,2 @@
+Avoid packaging _trial_temp directory in -py3 debian packages
+
diff --git a/debian/build_virtualenv b/debian/build_virtualenv
index e9ef245476..83346c40f1 100755
--- a/debian/build_virtualenv
+++ b/debian/build_virtualenv
@@ -42,8 +42,7 @@ tmpdir=`mktemp -d`
 trap "rm -r $tmpdir" EXIT
 
 cp -r tests "$tmpdir"
-cd debian/matrix-synapse-py3
 
 PYTHONPATH="$tmpdir" \
-    ./opt/venvs/matrix-synapse/bin/python \
+    debian/matrix-synapse-py3/opt/venvs/matrix-synapse/bin/python \
         -B -m twisted.trial --reporter=text -j2 tests
-- 
GitLab