Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit d820ff2

Browse files
H-ShayDavid Robertson
authored and
David Robertson
committed
BUILDS: poetry in deb virtualenvs
1 parent 87ecb33 commit d820ff2

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

debian/build_virtualenv

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ dh_virtualenv \
4343
--preinstall="wheel" \
4444
--extra-pip-arg="--no-cache-dir" \
4545
--extra-pip-arg="--compile" \
46-
--extras="all,systemd,test"
46+
--extras="all,systemd,test" \
47+
--requirements="requirements.txt"
4748

4849
PACKAGE_BUILD_DIR="debian/matrix-synapse-py3"
4950
VIRTUALENV_DIR="${PACKAGE_BUILD_DIR}${DH_VIRTUALENV_INSTALL_ROOT}/matrix-synapse"

docker/Dockerfile-dhvirtualenv

+9
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ RUN apt-get update -qq -o Acquire::Languages=none \
8585
libpq-dev \
8686
xmlsec1
8787

88+
RUN pip3 install -U \
89+
pip \
90+
setuptools \
91+
wheel
92+
93+
# We normally use poetry 1.1.12. However we need to use a prerelease of 1.2 here,
94+
# which fixes a bug in poetry export that stops us from exporting for Python 3.8 builds.
95+
RUN pip3 install poetry==1.2.0b1
96+
8897
COPY --from=builder /dh-virtualenv_1.2.2-1_all.deb /
8998

9099
# install dhvirtualenv. Update the apt cache again first, in case we got a

docker/build_debian.sh

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ DIST=$(cut -d ':' -f2 <<< "${distro:?}")
1111
cp -aT /synapse/source /synapse/build
1212
cd /synapse/build
1313

14+
# Export a requirements.txt file for the dh-virtualenv to use
15+
poetry export --extras "all test" -o requirements.txt
16+
1417
# if this is a prerelease, set the Section accordingly.
1518
#
1619
# When the package is later added to the package repo, reprepro will use the

0 commit comments

Comments
 (0)