python builds
Go to file
2024-10-03 13:36:25 -07:00
scripts use plain docker output and set compat per dist 2024-09-29 16:22:05 -07:00
src add 3.13.0 2024-10-03 13:36:25 -07:00
ssl fix output dirs 2023-08-29 20:58:27 -07:00
.dockerignore add python 3.9.5 2021-06-10 19:06:17 -07:00
.gitignore more cleanup 2023-08-29 21:01:46 -07:00
build.sh use plain docker output and set compat per dist 2024-09-29 16:22:05 -07:00
Dockerfile.bionic more cleanup 2023-08-29 21:01:46 -07:00
Dockerfile.disco more cleanup 2023-08-29 21:01:46 -07:00
Dockerfile.focal more cleanup 2023-08-29 21:01:46 -07:00
Dockerfile.jammy add jammy 2023-08-29 21:05:05 -07:00
Dockerfile.noble add ubuntu noble and python 3.13.0rc3 2024-09-28 17:03:48 -07:00
Dockerfile.trusty more cleanup 2023-08-29 21:01:46 -07:00
Dockerfile.xenial more cleanup 2023-08-29 21:01:46 -07:00
images.sh use plain docker output and set compat per dist 2024-09-29 16:22:05 -07:00
README.md add 3.13.0 2024-10-03 13:36:25 -07:00

extpython

Isolated python .deb builder

Extpython is a collection of tools for building installable packages containing various versions of Python. The installations are isolated from the operating system's python such that modules may be added, removed, or upgraded without risk of breaking. The builds are executed in Docker.

Example invocation:

./images.sh                      # pulls / creates base images with dependencies
./build.sh trusty-3.9.5.sh       # build using the recipe in the named script file

The vars file - trusty-3.9.5.sh above - contains information about what python version will be built. See src/bionic-3.9.5.sh for an annotated example.

Version support matrix

2.7 3.13** 3.11 3.10 3.9 3.8 3.7 3.6
Trusty 14.04 3.10.0* 3.9.5* 3.6.7
3.6.8
Xenial 16.04 3.10.0* 3.9.5 3.7.3 3.6.7
Bionic 18.04 2.7.16 3.11.5 3.10.0 3.9.5 3.8.0a4
3.8.0b1
3.7.3 3.6.7
Disco 19.04 3.7.3
Focal 20.04 3.13.0rc3
3.13.0
3.11.5 3.10.0 3.9.5
Jammy 22.04 3.13.0rc3
3.13.0
3.11.5
Noble 24.04 2.7.18 3.13.0rc3
3.13.0
3.11.10

* with provided extpython-openssl packages - see below

** 3.13 and newer are built with and without --disable-gil, and include virtualenv. Gil-less builds have the version number suffixed with t.

Openssl

Some versions of Python require a version of openssl that is newer than what ships on many of these host OSes. To satisfy this requirement, extpython also builds an Openssl package that installs in a similar isolated manner.

See ./ssl/ for details.

Trivia

  • Building C extensions won't work unless you install build tools, such as build-essential, development packages, required tools such as pkg-config, etc.

TODO

  • Parameter for pre-loaded pip modules

Uploading

curl -v 'http://artifact.scc.net.davepedu.com/addpkg?provider=tar&reponame=cpython&version=3.10.0' -F 'f=@cpython-3.10.0.tar.gz'

rpcli -s http://artifact.scc.net.davepedu.com upload -y apt -f builds/3.10.0/trusty/extpython-python3.10_3.10.0_amd64.deb -r extpython -p extpython-python3.10 -i 3.10.0 -a dist=trusty

Testing

Install extpython in a temporary container an run it.

docker run -it --rm ubuntu:bionic bash

sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y wget gnupg && \
. /etc/lsb-release && \
wget -q -O- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/${DISTRIB_CODENAME}/install | bash -x /dev/stdin && \
apt-get install -y extpython-python3.10