docker: fix Python cryptography build failure
authorPetr Štetiar <ynezz@true.cz>
Tue, 2 Mar 2021 14:13:22 +0000 (15:13 +0100)
committerPetr Štetiar <ynezz@true.cz>
Tue, 2 Mar 2021 14:14:06 +0000 (15:14 +0100)
It seems like recent Python cryptography package versions need Rust
compiler present for OpenSSL wrapper, which leads to following error:

 generating cffi module 'build/temp.linux-x86_64-3.7/_openssl.c'
 running build_rust
 ...
 error: Can not find Rust compiler

There is following note regarding this issue in the documentation:

 If you are on RHEL/CentOS/Fedora/Debian/Ubuntu or another distribution
 derived from the preceding list, then you should upgrade pip (in a
 virtual environment!) and attempt to install cryptography again before
 trying to install the Rust toolchain. These platforms will receive a
 binary wheel and require no compiler if you have an updated pip!

So fix this by recommended pip update.

References: https://cryptography.io/en/latest/installation.html#rust
Signed-off-by: Petr Štetiar <ynezz@true.cz>
docker/buildmaster/Dockerfile
docker/buildslave/Dockerfile

index cc85aabc90c15c3df250e2ce03076c17319f93ab..9e10041d201f820f4f885cdd934f4dbcb9429335 100644 (file)
@@ -26,6 +26,7 @@ RUN \
        apt-get clean && \
        localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
 
+RUN pip3 install -U pip
 RUN \
        pip3 install \
                "buildbot-www==$BUILDBOT_VERSION" \
index 2da6910605b56a2bf798ee10688d2bd511e2bc0f..31eb72055ae894c848c0851116d8b535f8c0e842 100644 (file)
@@ -34,6 +34,7 @@ RUN \
        apt-get clean && \
        localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
 
+RUN pip3 install -U pip
 RUN pip3 install \
                "buildbot-worker==$BUILDBOT_VERSION" \
                pyOpenSSL \