Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .nanvix/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,28 @@

FROM ghcr.io/nanvix/toolchain-gcc:sha-34a3641

# Install the host Python plus the build helpers required by extension
# modules that ship a meson or Cython build step (numpy, scipy, pandas,
# ...):
#
# - ninja — meson's default backend; missing it makes every meson-based
# extension build fail immediately.
# - Cython — required by numpy 1.26.4's `numpy/_build_utils/tempita.py`
# .pyx.in code generation. Pinned `<3` for numpy 1.26.x
# compatibility; lift the pin when bumping numpy.
#
# We deliberately purge `/usr/include/python3.12` after the install. The
# `python3-pip` / `ninja-build` apt packages transitively pull in
# `libpython3.12-dev`, whose headers under `/usr/include/python3.12` would
# otherwise be picked up by meson's regen step ahead of the Nanvix cross
# sysroot headers and silently corrupt the cross-build.
Comment on lines +19 to +23
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-dev \
python3-pip \
ninja-build \
&& pip3 install --break-system-packages --no-cache-dir 'Cython<3' \
&& rm -rf /usr/include/python3.12 \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3 /opt/nanvix/bin/python3
Loading