From 57940b1423b7f33b405e41631d1cd52603e9d10d Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Wed, 26 Oct 2022 09:18:16 +0200 Subject: [PATCH] :pushpin: Pin lxml to not use binary wheels This is in preparation to upgrading python3-saml and then lxml to their latest versions. lxml breaks on some edge cases becaues it was statically built against a different libxml2 than *other* xml-based tooling using at runtime ( because that's dynamically linked), causing some tree lookups to fail. * python3-saml issue: https://github.com/onelogin/python3-saml/issues/292 * upstream bug: https://bugs.launchpad.net/lxml/+bug/1960668 --- Dockerfile | 3 +++ requirements/base.in | 4 ++++ requirements/base.txt | 2 ++ requirements/ci.txt | 2 ++ requirements/dev.txt | 2 ++ 5 files changed, 13 insertions(+) diff --git a/Dockerfile b/Dockerfile index 091d9c6cee..2c90369fab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,10 +14,13 @@ FROM python:3.8-slim-buster AS backend-build RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config \ build-essential \ + python3-dev \ git \ libpq-dev \ libxml2-dev \ + libxslt-dev \ libxmlsec1-dev \ + zlib1g-dev \ libxmlsec1-openssl \ # weasyprint deps libcairo2 \ diff --git a/requirements/base.in b/requirements/base.in index 9b28d3885e..21c19fd141 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -6,6 +6,10 @@ furl glom git+https://github.com/maykinmedia/json-logic-py.git@f877f5326231bdcf4621783278f22c8565ec7913#egg=maykin-json-logic-py html5lib +# see https://github.com/onelogin/python3-saml/issues/292 and +# https://bugs.launchpad.net/lxml/+bug/1960668 -> we can avoid this by compiling lxml +# against the system libxml2 +--no-binary lxml lxml O365 # microsoft graph phonenumbers diff --git a/requirements/base.txt b/requirements/base.txt index 783b5a613b..851c6449bb 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,6 +4,8 @@ # # ./bin/compile_dependencies.sh # +--no-binary lxml + amqp==5.0.9 # via kombu asgiref==3.5.0 diff --git a/requirements/ci.txt b/requirements/ci.txt index 64c7e4940a..3b6e9eee32 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,6 +4,8 @@ # # ./bin/compile_dependencies.sh # +--no-binary lxml + alabaster==0.7.12 # via sphinx amqp==5.0.9 diff --git a/requirements/dev.txt b/requirements/dev.txt index 58ba63ae0c..d4b3dc31c1 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,6 +4,8 @@ # # ./bin/compile_dependencies.sh # +--no-binary lxml + alabaster==0.7.12 # via # -c requirements/ci.txt