File tree Expand file tree Collapse file tree 6 files changed +81
-2
lines changed
Expand file tree Collapse file tree 6 files changed +81
-2
lines changed Original file line number Diff line number Diff line change 88 branches : [main]
99
1010jobs :
11- build_devcontainer :
12- name : Build and test (Devcontainer)
11+ build_build_container :
12+ name : Build and test (build container)
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ os : [ubuntu-latest, ubuntu-24.04-arm]
17+ runs-on : ${{ matrix.os }}
18+ env :
19+ TAG : cpython-buildcontainer:1.0.0-${{ github.run_id }}
20+ steps :
21+ - name : Checkout Push to Registry action
22+ uses : actions/checkout@v5
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v3
25+ - name : Build Dockerfile
26+ uses : docker/build-push-action@v6
27+ with :
28+ context : ./devcontainer
29+ load : true
30+ tags : ${{ env.TAG }}
31+ - name : Test Clang version
32+ run : docker run --rm ${{ env.TAG }} clang --version
33+
34+ build_dev_container :
35+ name : Build and test (Dev container)
1336 strategy :
1437 fail-fast : false
1538 matrix :
Original file line number Diff line number Diff line change 1010 type : choice
1111 options :
1212 - autoconf
13+ - buildcontainer
1314 - devcontainer
1415
1516run-name : " Release: ${{ inputs.package }}"
Original file line number Diff line number Diff line change 1+ FROM docker.io/library/fedora:41
2+
3+ LABEL org.opencontainers.image.base.name="docker.io/library/fedora:41"
4+ LABEL org.opencontainers.image.source="https://github.com/python/cpython-devcontainers"
5+ LABEL org.opencontainers.image.title="CPython build container"
6+ LABEL org.opencontainers.image.description="CPython build container for Linux."
7+ LABEL org.opencontainers.image.authors="Brett Cannon"
8+
9+ ENV CC=clang
10+
11+ # Remove a video codec repository to speed up installs.
12+ RUN dnf config-manager setopt fedora-cisco-openh264.enabled=False
13+
14+ RUN mkdir -p /opt/cpython-devcontainer/bin
15+ COPY --chmod=755 install-builddeps.sh /opt/cpython-devcontainer/bin/
16+
17+ RUN /opt/cpython-devcontainer/bin/install-builddeps.sh
Original file line number Diff line number Diff line change 1+ This container image contains everything necessary to build CPython on Linux.
2+
3+ It is ** not** meant for general development unless you are space-constrained.
4+ For development you should use the
5+ [ dev container image] ( https://github.com/python/cpython-devcontainers/tree/main/devcontainer ) .
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ # Install build tools and CPython dependencies on Fedora.
4+
5+
6+ # Define dependencies as an array, for easier formatting & comments.
7+ # see: https://www.gnu.org/software/bash/manual/html_node/Arrays.html
8+ # Contents inspired by experience and
9+ # https://github.com/devcontainers/features/tree/main/src/common-utils .
10+ DEPS=(
11+ # Bare minimum
12+ /usr/bin/{blurb,clang,git}
13+
14+ # Necessary for getting Python build dependencies
15+ ' dnf5-command(builddep)'
16+
17+ # TODO: remove when Fedora version includes Python 3.14
18+ libzstd-devel
19+ )
20+
21+ dnf -y --nodocs --setopt=install_weak_deps=False install ${DEPS[@]}
22+ dnf -y --nodocs --setopt=install_weak_deps=False builddep python3
23+
24+ # Don't leave caches in the container
25+ dnf -y clean all
Original file line number Diff line number Diff line change 1+ A general dev container for developing CPython for Linux and WASI.
2+
3+ See the
4+ [ devguide's container docs] ( https://devguide.python.org/getting-started/setup-building/#using-a-container )
5+ on how to use this container image for development.
6+
7+ If you need a smaller/minimal container image, see the
8+ [ build container] ( https://github.com/python/cpython-devcontainers/tree/main/buildcontainer ) .
You can’t perform that action at this time.
0 commit comments