File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ RUN yum install -y perl-IPC-Cmd && \
5353 ldconfig
5454
5555# Compile and install Python 3
56- ENV PYTHON3_VERSION=3.11.8
56+ ENV PYTHON3_VERSION=3.12.4
5757RUN yum install -y libffi-devel && \
5858 DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
5959 VERSION="${PYTHON3_VERSION}" \
60- SHA256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889 " \
60+ SHA256="01b3c1c082196f3b33168d344a9c85fb07bfe0e7ecfe77fee4443420d1ce2ad9 " \
6161 RELATIVE_PATH="Python-{{version}}" \
6262 bash install-from-source.sh \
6363 --prefix=/opt/python/${PYTHON_VERSION} \
Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ RUN yum install -y perl-IPC-Cmd && \
5151 ldconfig
5252
5353# Compile and install Python 3
54- ENV PYTHON3_VERSION=3.11.8
54+ ENV PYTHON3_VERSION=3.12.4
5555RUN yum install -y libffi-devel && \
5656 DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
5757 VERSION="${PYTHON3_VERSION}" \
58- SHA256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889 " \
58+ SHA256="01b3c1c082196f3b33168d344a9c85fb07bfe0e7ecfe77fee4443420d1ce2ad9 " \
5959 RELATIVE_PATH="Python-{{version}}" \
6060 bash install-from-source.sh --prefix=/opt/python/${PYTHON_VERSION} --with-ensurepip=yes --enable-ipv6 --with-dbmliborder=
6161ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}"
Original file line number Diff line number Diff line change @@ -73,17 +73,17 @@ RUN Get-RemoteFile `
7373 Approve-File -Path $($Env:USERPROFILE + '\. cargo\b in\r ustc.exe' ) -Hash $Env:RUSTC_HASH
7474
7575# Install Python 3
76- ENV PYTHON_VERSION="3.11.7 "
76+ ENV PYTHON_VERSION="3.12.4 "
7777RUN Get-RemoteFile `
7878 -Uri https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe `
7979 -Path python-$Env:PYTHON_VERSION-amd64.exe `
80- -Hash 'c117c6444494bbe4cc937e8a5a61899d53f7f5c5bc573c5d130304e457d54024 ' ; `
80+ -Hash 'da5809df5cb05200b3a528a186f39b7d6186376ce051b0a393f1ddf67c995258 ' ; `
8181 Start-Process -Wait python-$Env:PYTHON_VERSION-amd64.exe -ArgumentList '/quiet' , 'InstallAllUsers=1' ; `
8282 Remove-Item python-$Env:PYTHON_VERSION-amd64.exe; `
83- & 'C:\P rogram Files\P ython311 \p ython.exe' -m pip install --no-warn-script-location --upgrade pip; `
84- & 'C:\P rogram Files\P ython311 \p ython.exe' -m pip install --no-warn-script-location virtualenv; `
85- & 'C:\P rogram Files\P ython311 \p ython.exe' -m virtualenv 'C:\p y3' ; `
86- Add-ToPath -Append 'C:\P rogram Files\P ython311 '
83+ & 'C:\P rogram Files\P ython312 \p ython.exe' -m pip install --no-warn-script-location --upgrade pip; `
84+ & 'C:\P rogram Files\P ython312 \p ython.exe' -m pip install --no-warn-script-location virtualenv; `
85+ & 'C:\P rogram Files\P ython312 \p ython.exe' -m virtualenv 'C:\p y3' ; `
86+ Add-ToPath -Append 'C:\P rogram Files\P ython312 '
8787
8888# Install Python 2
8989ENV PYTHON_VERSION="2.7.18"
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ def default_python_version() -> str:
3636 return match .group (1 )
3737
3838
39+ @cache
40+ def target_python_for_major (python_major : str ):
41+ return '2.7' if python_major == '2' else default_python_version ()
42+
43+
3944def is_compatible_wheel (
4045 target_name : str ,
4146 target_python_major : str ,
@@ -44,7 +49,7 @@ def is_compatible_wheel(
4449 platform : str ,
4550) -> bool :
4651 if interpreter .startswith ('cp' ):
47- target_python = '2.7' if target_python_major == '2' else default_python_version ( )
52+ target_python = target_python_for_major ( target_python_major )
4853 expected_tag = f'cp{ target_python_major } ' if abi == 'abi3' else f'cp{ target_python } ' .replace ('.' , '' )
4954 if expected_tag not in interpreter :
5055 return False
@@ -134,8 +139,9 @@ def main():
134139 for target in Path (args .targets_dir ).iterdir ():
135140 for python_version in target .iterdir ():
136141 if python_version .name .startswith ('py' ):
142+ python_target = target_python_for_major (python_version .name .strip ('py' ))
137143 generate_lock_file (
138- python_version / 'frozen.txt' , LOCK_FILE_DIR / f'{ target .name } _{ python_version . name } .txt'
144+ python_version / 'frozen.txt' , LOCK_FILE_DIR / f'{ target .name } _{ python_target } .txt'
139145 )
140146
141147 if (image_digest_file := target / 'image_digest' ).is_file ():
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ jobs:
108108 if : matrix.job.image == 'linux-aarch64'
109109 run : |
110110 mkdir -p ~/miniconda3
111- wget https://repo.anaconda.com/miniconda/Miniconda3-py311_24.1.2 -0-Linux-aarch64.sh -O ~/miniconda3/miniconda.sh
111+ wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0 -0-Linux-aarch64.sh -O ~/miniconda3/miniconda.sh
112112 bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
113113 rm -rf ~/miniconda3/miniconda.sh
114114 ~/miniconda3/bin/conda init bash
@@ -204,7 +204,7 @@ jobs:
204204 env :
205205 TARGET_NAME : macos-x86_64
206206 OUT_DIR : output/macos-x86_64
207- DD_PYTHON3 : " /Library/Frameworks/Python.framework/Versions/3.11 /bin/python"
207+ DD_PYTHON3 : " /Library/Frameworks/Python.framework/Versions/3.12 /bin/python"
208208 DD_PYTHON2 : " /Library/Frameworks/Python.framework/Versions/2.7/bin/python"
209209
210210 steps :
@@ -218,7 +218,7 @@ jobs:
218218 - name : Set up Python
219219 env :
220220 # Despite the name, this is built for the macOS 11 SDK on arm64 and 10.9+ on intel
221- PYTHON3_DOWNLOAD_URL : " https://www.python.org/ftp/python/3.11.5 /python-3.11.5 -macos11.pkg"
221+ PYTHON3_DOWNLOAD_URL : " https://www.python.org/ftp/python/3.12.4 /python-3.12.4 -macos11.pkg"
222222 PYTHON2_DOWNLOAD_URL : " https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg"
223223 run : |-
224224 curl "$PYTHON3_DOWNLOAD_URL" -o python3.pkg
You can’t perform that action at this time.
0 commit comments