Skip to content

Commit 4e34762

Browse files
committed
🔧(backend) install lxml and xmlsec from source
On bootstrap, we run into a `lxml & xmlsec libxml2 library version mismatch` error. Following python social auth documentation, we need to install both lxml and xmlsec packages from source.
1 parent 319d910 commit 4e34762

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ jobs:
231231
auth:
232232
username: $DOCKER_HUB_USER
233233
password: $DOCKER_HUB_PASS
234+
environment:
235+
PIP_NO_BINARY: lxml,xmlsec
234236
working_directory: ~/marsha/src/backend
235237
steps:
236238
- checkout:
@@ -602,6 +604,7 @@ jobs:
602604
DJANGO_MARKDOWN_ENABLED: 1
603605
DEBUG: pw:browser*
604606
BUILD_PATH: ../../../backend/marsha/static/js/build/site/
607+
PIP_NO_BINARY: lxml,xmlsec
605608
- image: cimg/postgres:16.4
606609
auth:
607610
username: $DOCKER_HUB_USER

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ RUN apt-get update && \
2222
gcc \
2323
libxml2-dev \
2424
libxmlsec1-dev \
25-
libxmlsec1-openssl && \
25+
libxmlsec1-openssl \
26+
zlib1g-dev && \
2627
rm -rf /var/lib/apt/lists/*
2728

29+
ENV PIP_NO_BINARY=lxml,xmlsec
30+
2831
RUN mkdir /install && \
2932
pip install --prefix=/install .
3033

src/backend/setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ install_requires =
7070
urllib3==2.2.3
7171
uvicorn[standard]==0.34.0
7272
whitenoise==6.8.2
73+
xmlsec==1.3.15
7374
xmpppy==0.7.1
7475

7576
# App BBB

0 commit comments

Comments
 (0)