Skip to content

Commit 11a2413

Browse files
Adding python3.13 to toxic (#55)
See issue #54
1 parent 27c08f0 commit 11a2413

File tree

6 files changed

+67
-31
lines changed

6 files changed

+67
-31
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ is based on Ubuntu and provides all modern Python3 distributions, pip, tox, and
7777

7878
| tag | Base Python | Python Versions | Tox | Nox | pip | Platforms | Other Utilities |
7979
|----------|-------------|-----------------|-----|-----|-----|-----------|-----------------|
80+
| [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> | |
8081
| [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> | |
8182
| [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> | |
8283
| [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> |

toxic/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,21 @@ FROM base AS provisioning
2222
WORKDIR /tmp
2323
ADD pre-provision.sh ./pre-provision.sh
2424
ADD provision.sh ./provision.sh
25+
ADD provision-python.sh ./provision-python.sh
26+
ADD provision-pip.sh ./provision-pip.sh
2527
ADD post-provision.sh ./post-provision.sh
2628

2729
RUN ./pre-provision.sh
2830
RUN ./provision.sh
29-
RUN ./pre-provision.sh
31+
RUN ./provision-python.sh 3.8 6 distutils
32+
RUN ./provision-python.sh 3.9 5 distutils
33+
RUN ./provision-python.sh 3.10 4 distutils
34+
RUN ./provision-python.sh 3.11 3 distutils
35+
RUN ./provision-python.sh 3.12 1 distutils
36+
RUN ./provision-python.sh 3.13 2
37+
RUN update-alternatives --set python3 /usr/bin/python3.11
38+
RUN ./provision-pip.sh
39+
RUN ./post-provision.sh
3040

3141

3242

@@ -35,8 +45,5 @@ RUN ./pre-provision.sh
3545
# +---------------------------------------------------------------------------+
3646
FROM provisioning AS all
3747

38-
# INSTALL THE PATH FOR INTERATIVE SESSIONS
39-
RUN echo "export PATH=$PATH" >> ~/.bashrc
40-
4148
# LEAVE THE WORKDIR AS /repo
4249
WORKDIR /repo

toxic/post-provision.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ set -o pipefail
2020

2121
# +----------------------------------------------------------+
2222

23+
# INSTALL THE PATH FOR INTERACTIVE SESSIONS
24+
echo "export PATH=$PATH" >> ~/.bashrc
25+
2326
echo "export LANG=en_US.UTF-8" >> ~/.bashrc
2427
echo "export LANGUAGE=en_US:en" >> ~/.bashrc
2528
echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
29+
2630
echo "alias la=\"ls -lah\"" >> ~/.bashrc

toxic/provision-pip.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
# +----------------------------------------------------------+
4+
# | BASH : Modifying Shell Behaviour
5+
# | (https://www.gnu.org/software/bash/manual)
6+
# +----------------------------------------------------------+
7+
# Treat unset variables and parameters other than the special
8+
# parameters ‘@’ or ‘*’ as an error when performing parameter
9+
# expansion. An error message will be written to the standard
10+
# error, and a non-interactive shell will exit.
11+
set -o nounset
12+
13+
# Exit immediately if a pipeline returns a non-zero status.
14+
set -o errexit
15+
16+
# If set, the return value of a pipeline is the value of the
17+
# last (rightmost) command to exit with a non-zero status, or
18+
# zero if all commands in the pipeline exit successfully.
19+
set -o pipefail
20+
21+
# +----------------------------------------------------------+
22+
export DEBIAN_FRONTEND=noninteractive
23+
24+
apt-get -y install python3-pip
25+
26+
pip3 install tox
27+
pip3 install nox

toxic/provision-python.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
# +----------------------------------------------------------+
4+
# | BASH : Modifying Shell Behaviour
5+
# | (https://www.gnu.org/software/bash/manual)
6+
# +----------------------------------------------------------+
7+
# Exit immediately if a pipeline returns a non-zero status.
8+
set -o errexit
9+
10+
# If set, the return value of a pipeline is the value of the
11+
# last (rightmost) command to exit with a non-zero status, or
12+
# zero if all commands in the pipeline exit successfully.
13+
set -o pipefail
14+
15+
# +----------------------------------------------------------+
16+
export DEBIAN_FRONTEND=noninteractive
17+
18+
apt-get -y install python$1
19+
20+
if [[ $3 == distutils ]]; then
21+
apt-get -y install python$1-distutils
22+
fi
23+
24+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python$1 $2

toxic/provision.sh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,3 @@ apt-get -y install git
2626
apt-get -y install curl
2727
apt-get -y install wget
2828
apt-get -y install unzip
29-
30-
# deadsnakes maintains a bunch of python versions for Ubuntu.
31-
add-apt-repository -y ppa:deadsnakes/ppa
32-
apt-get update
33-
apt-get -y install python3.10
34-
apt-get -y install python3-pip
35-
36-
apt-get -y install python3.7
37-
apt-get -y install python3.7-distutils
38-
apt-get -y install python3.8
39-
apt-get -y install python3.8-distutils
40-
apt-get -y install python3.9
41-
apt-get -y install python3.9-distutils
42-
apt-get -y install python3.11
43-
apt-get -y install python3.11-distutils
44-
apt-get -y install python3.12
45-
apt-get -y install python3.12-distutils
46-
47-
48-
pip3 install tox
49-
pip3 install nox
50-
51-
echo "export PATH=$PATH" >> ~/.bashrc
52-
echo "export LANG=en_US.UTF-8" >> ~/.bashrc
53-
echo "export LANGUAGE=en_US:en" >> ~/.bashrc
54-
echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
55-
echo "alias la=\"ls -lah\"" >> ~/.bashrc

0 commit comments

Comments
 (0)