Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding python3.13 to toxic #55

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ is based on Ubuntu and provides all modern Python3 distributions, pip, tox, and

| tag | Base Python | Python Versions | Tox | Nox | pip | Platforms | Other Utilities |
|----------|-------------|-----------------|-----|-----|-----|-----------|-----------------|
| [tx22.4.3](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic) | 3.11 | 3.8, 3.9, 3.10, 3.11, 3.12 3.13 | 4.13.0 | 2023.4.22 | 20.0.2 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | |
| [tx22.4.2](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic) | 3.10 | 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 | 4.13.0 | 2023.4.22 | 20.0.2 | <ul><li>linux/amd64</li><li>linux/arm64</li></ul> | |
| [tx22.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic) | 3.8 | 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 | 4.4.5 | 2023.4.22 | 20.0.2 | <ul><li>linux/amd64</li></ul> | |
| [tx20.4.1](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toxic) | 3.8 | 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 | 4.4.5 | (not available) | 20.0.2 | <ul><li>linux/amd64</li></ul> | <ul><li>sonar-scanner</li></ul> |
Expand Down
15 changes: 11 additions & 4 deletions toxic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ FROM base AS provisioning
WORKDIR /tmp
ADD pre-provision.sh ./pre-provision.sh
ADD provision.sh ./provision.sh
ADD provision-python.sh ./provision-python.sh
ADD provision-pip.sh ./provision-pip.sh
ADD post-provision.sh ./post-provision.sh

RUN ./pre-provision.sh
RUN ./provision.sh
RUN ./pre-provision.sh
RUN ./provision-python.sh 3.8 6 distutils
RUN ./provision-python.sh 3.9 5 distutils
RUN ./provision-python.sh 3.10 4 distutils
RUN ./provision-python.sh 3.11 3 distutils
RUN ./provision-python.sh 3.12 1 distutils
RUN ./provision-python.sh 3.13 2
RUN update-alternatives --set python3 /usr/bin/python3.11
RUN ./provision-pip.sh
RUN ./post-provision.sh



Expand All @@ -35,8 +45,5 @@ RUN ./pre-provision.sh
# +---------------------------------------------------------------------------+
FROM provisioning AS all

# INSTALL THE PATH FOR INTERATIVE SESSIONS
RUN echo "export PATH=$PATH" >> ~/.bashrc

# LEAVE THE WORKDIR AS /repo
WORKDIR /repo
4 changes: 4 additions & 0 deletions toxic/post-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ set -o pipefail

# +----------------------------------------------------------+

# INSTALL THE PATH FOR INTERACTIVE SESSIONS
echo "export PATH=$PATH" >> ~/.bashrc

echo "export LANG=en_US.UTF-8" >> ~/.bashrc
echo "export LANGUAGE=en_US:en" >> ~/.bashrc
echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc

echo "alias la=\"ls -lah\"" >> ~/.bashrc
27 changes: 27 additions & 0 deletions toxic/provision-pip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# +----------------------------------------------------------+
# | BASH : Modifying Shell Behaviour
# | (https://www.gnu.org/software/bash/manual)
# +----------------------------------------------------------+
# Treat unset variables and parameters other than the special
# parameters ‘@’ or ‘*’ as an error when performing parameter
# expansion. An error message will be written to the standard
# error, and a non-interactive shell will exit.
set -o nounset

# Exit immediately if a pipeline returns a non-zero status.
set -o errexit

# If set, the return value of a pipeline is the value of the
# last (rightmost) command to exit with a non-zero status, or
# zero if all commands in the pipeline exit successfully.
set -o pipefail

# +----------------------------------------------------------+
export DEBIAN_FRONTEND=noninteractive

apt-get -y install python3-pip

pip3 install tox
pip3 install nox
24 changes: 24 additions & 0 deletions toxic/provision-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# +----------------------------------------------------------+
# | BASH : Modifying Shell Behaviour
# | (https://www.gnu.org/software/bash/manual)
# +----------------------------------------------------------+
# Exit immediately if a pipeline returns a non-zero status.
set -o errexit

# If set, the return value of a pipeline is the value of the
# last (rightmost) command to exit with a non-zero status, or
# zero if all commands in the pipeline exit successfully.
set -o pipefail

# +----------------------------------------------------------+
export DEBIAN_FRONTEND=noninteractive

apt-get -y install python$1

if [[ $3 == distutils ]]; then
apt-get -y install python$1-distutils
fi

update-alternatives --install /usr/bin/python3 python3 /usr/bin/python$1 $2
27 changes: 0 additions & 27 deletions toxic/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,3 @@ apt-get -y install git
apt-get -y install curl
apt-get -y install wget
apt-get -y install unzip

# deadsnakes maintains a bunch of python versions for Ubuntu.
add-apt-repository -y ppa:deadsnakes/ppa
apt-get update
apt-get -y install python3.10
apt-get -y install python3-pip

apt-get -y install python3.7
apt-get -y install python3.7-distutils
apt-get -y install python3.8
apt-get -y install python3.8-distutils
apt-get -y install python3.9
apt-get -y install python3.9-distutils
apt-get -y install python3.11
apt-get -y install python3.11-distutils
apt-get -y install python3.12
apt-get -y install python3.12-distutils


pip3 install tox
pip3 install nox

echo "export PATH=$PATH" >> ~/.bashrc
echo "export LANG=en_US.UTF-8" >> ~/.bashrc
echo "export LANGUAGE=en_US:en" >> ~/.bashrc
echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
echo "alias la=\"ls -lah\"" >> ~/.bashrc
Loading