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

Commit

Permalink
BUILDS: poetry in deb virtualenvs
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay authored and David Robertson committed Mar 30, 2022
1 parent dec8ecc commit 5d03d94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/build_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ dh_virtualenv \
--preinstall="wheel" \
--extra-pip-arg="--no-cache-dir" \
--extra-pip-arg="--compile" \
--extras="all,systemd,test"
--extras="all,systemd,test" \
--requirements="requirements.txt"

PACKAGE_BUILD_DIR="debian/matrix-synapse-py3"
VIRTUALENV_DIR="${PACKAGE_BUILD_DIR}${DH_VIRTUALENV_INSTALL_ROOT}/matrix-synapse"
Expand Down
9 changes: 9 additions & 0 deletions docker/Dockerfile-dhvirtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ RUN apt-get update -qq -o Acquire::Languages=none \
libpq-dev \
xmlsec1

RUN pip3 install -U \
pip \
setuptools \
wheel

# We normally use poetry 1.1.12. However we need to use a prerelease of 1.2 here,
# which fixes a bug in poetry export that stops us from exporting for Python 3.8 builds.
RUN pip3 install poetry==1.2.0b1

COPY --from=builder /dh-virtualenv_1.2.2-1_all.deb /

# install dhvirtualenv. Update the apt cache again first, in case we got a
Expand Down
3 changes: 3 additions & 0 deletions docker/build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ DIST=$(cut -d ':' -f2 <<< "${distro:?}")
cp -aT /synapse/source /synapse/build
cd /synapse/build

# Export a requirements.txt file for the dh-virtualenv to use
poetry export --extras "all test" -o requirements.txt

# if this is a prerelease, set the Section accordingly.
#
# When the package is later added to the package repo, reprepro will use the
Expand Down

0 comments on commit 5d03d94

Please sign in to comment.