From 2ad6540b57c07b0aac045aa39ec6963d0128acdf Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 31 Mar 2021 20:05:52 +0000 Subject: [PATCH] Add rust as a build dependency. (#201) * Add rust as a build dependency. This is because the `cryptography` package now uses rust for memory safety reasons. --- Dockerfile | 2 +- pypy.Dockerfile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2896a5d..1bcd04d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /usr/src/app COPY ./requirements.txt /usr/src/app # Build Dependencies -RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ +RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ cargo rust # Python Dependencies RUN pip install --no-cache-dir --prefix=/install wheel cryptography gunicorn pymysql diff --git a/pypy.Dockerfile b/pypy.Dockerfile index 347cdb4..795f831 100644 --- a/pypy.Dockerfile +++ b/pypy.Dockerfile @@ -12,6 +12,12 @@ RUN apt-get update \ && apt-get install -yq build-essential libssl-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* +# install rust toolchain +RUN curl https://sh.rustup.rs -sSf | \ + sh -s -- --default-toolchain stable -y + +ENV PATH=/root/.cargo/bin:$PATH + # Python Dependencies RUN pip install --no-warn-script-location --ignore-installed --no-cache-dir --prefix=/install wheel cryptography gunicorn pymysql RUN pip install --no-warn-script-location --ignore-installed --no-cache-dir --prefix=/install -r requirements.txt