From cb08b6321793ced90996f75071ba3baa9012938e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 21 Nov 2023 12:40:11 +0100 Subject: [PATCH] fix: add missing pkg-config package (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build fails in nightly with the following error: #27 4.029 × Getting requirements to build wheel did not run successfully. #27 4.029 │ exit code: 1 #27 4.029 ╰─> [24 lines of output] #27 4.029 /bin/sh: 1: pkg-config: not found #27 4.029 /bin/sh: 1: pkg-config: not found #27 4.029 Trying pkg-config --exists mysqlclient #27 4.029 Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127. #27 4.029 Trying pkg-config --exists mariadb #27 4.029 Command 'pkg-config --exists mariadb' returned non-zero exit status 127. #27 4.029 Traceback (most recent call last): #27 4.029 File "/app/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in #27 4.029 main() #27 4.029 File "/app/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main #27 4.029 json_out['return_val'] = hook(**hook_input['kwargs']) #27 4.029 File "/app/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel #27 4.029 return hook(config_settings) #27 4.029 File "/tmp/pip-build-env-td0z_pds/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel #27 4.029 return self._get_build_requires(config_settings, requirements=['wheel']) #27 4.029 File "/tmp/pip-build-env-td0z_pds/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires #27 4.029 self.run_setup() #27 4.029 File "/tmp/pip-build-env-td0z_pds/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup #27 4.029 exec(code, locals()) #27 4.029 File "", line 154, in #27 4.029 File "", line 48, in get_config_posix #27 4.029 File "", line 27, in find_package_name #27 4.029 Exception: Can not find valid pkg-config name. #27 4.029 Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually --- tutornotes/templates/notes/build/notes/Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tutornotes/templates/notes/build/notes/Dockerfile b/tutornotes/templates/notes/build/notes/Dockerfile index b26c2f7..68c95f9 100644 --- a/tutornotes/templates/notes/build/notes/Dockerfile +++ b/tutornotes/templates/notes/build/notes/Dockerfile @@ -1,12 +1,19 @@ {% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %} FROM docker.io/ubuntu:20.04 +ENV DEBIAN_FRONTEND=noninteractive RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \ apt update && \ apt upgrade -y && \ - # python 3.8 - apt install -y language-pack-en git python3 python3-pip python3-venv libmysqlclient-dev + apt install -y \ + language-pack-en \ + git \ + python3 \ + python3-pip \ + python3-venv \ + libmysqlclient-dev \ + pkg-config RUN ln -s /usr/bin/python3 /usr/bin/python ###### Git-clone Notes repo ######