Skip to content

Commit 6681e61

Browse files
authored
chore(cross): Install Python 3.12 (#7224)
1 parent 94fe6a4 commit 6681e61

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

rust/cubestore/cross/aarch64-unknown-linux-gnu.Dockerfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN apt-get update \
1111
&& add-apt-repository -y ppa:deadsnakes/ppa \
1212
&& apt-get update \
1313
# python3 on x86 is required for cross compiling python :D
14-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3.11 python3.10 python3.9 \
14+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3.12 python3.11 python3.10 python3.9 \
1515
&& DEBIAN_FRONTEND=noninteractive apt-get install -y libffi-dev binutils-multiarch binutils-aarch64-linux-gnu gcc-multilib g++-multilib \
1616
# llvm14-dev will install python 3.8 as bin/python3
1717
&& DEBIAN_FRONTEND=noninteractive apt-get install -y llvm-14 clang-14 libclang-14-dev clang-14 \
@@ -63,6 +63,24 @@ ENV PYO3_CROSS_PYTHON_VERSION=3.11 \
6363
PYO3_CROSS_INCLUDE_DIR=/usr/aarch64-linux-gnu/include \
6464
PYO3_CROSS_LIB_DIR=/usr/aarch64-linux-gnu/lib
6565

66+
ENV PYTHON_VERSION=3.12.0
67+
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz && \
68+
cd Python-${PYTHON_VERSION} && \
69+
touch config.site-aarch64 && \
70+
echo "ac_cv_buggy_getaddrinfo=no" >> config.site-aarch64 && \
71+
echo "ac_cv_file__dev_ptmx=no" >> config.site-aarch64 && \
72+
echo "ac_cv_file__dev_ptc=no" >> config.site-aarch64 && \
73+
CONFIG_SITE=config.site-aarch64 ./configure \
74+
--enable-optimizations \
75+
--disable-ipv6 \
76+
--prefix=/usr/aarch64-linux-gnu \
77+
--build=aarch64-unknown-linux-gnu \
78+
--host=x86_64-linux-gnu \
79+
--with-build-python=/usr/bin/python3.12 && \
80+
make -j $(nproc) && \
81+
make install && \
82+
cd .. && rm -rf Python-${PYTHON_VERSION};
83+
6684
ENV PYTHON_VERSION=3.11.3
6785
RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz && \
6886
cd Python-${PYTHON_VERSION} && \

rust/cubestore/cross/x86_64-unknown-linux-gnu.Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ ENV OPENSSL_DIR=/openssl
3333
ENV OPENSSL_ROOT_DIR=/openssl
3434
ENV OPENSSL_LIBRARIES=/openssl/lib
3535

36+
ENV PYTHON_VERSION=3.12.0
37+
RUN cd tmp && wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz \
38+
&& cd Python-${PYTHON_VERSION} && \
39+
./configure \
40+
--enable-shared \
41+
--with-openssl=/openssl \
42+
--enable-optimizations \
43+
--disable-ipv6 \
44+
--prefix=/usr \
45+
&& make -j $(nproc) \
46+
&& make install \
47+
&& ln -f -s /usr/bin/python3.12 /usr/bin/python3 \
48+
&& cd .. && rm -rf Python-${PYTHON_VERSION};
49+
3650
ENV PYTHON_VERSION=3.11.3
3751
RUN cd tmp && wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -O - | tar -xz \
3852
&& cd Python-${PYTHON_VERSION} && \

0 commit comments

Comments
 (0)