Skip to content

Commit

Permalink
fix: add missing pkg-config package (#30)
Browse files Browse the repository at this point in the history
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 <module>
	#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 "<string>", line 154, in <module>
	#27 4.029         File "<string>", line 48, in get_config_posix
	#27 4.029         File "<string>", 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
  • Loading branch information
regisb authored Nov 21, 2023
1 parent 0768eaf commit cb08b63
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tutornotes/templates/notes/build/notes/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 ######
Expand Down

0 comments on commit cb08b63

Please sign in to comment.