11{{ def is_3: env.version | startswith("3") -}}
2- {{ def cmd: if [ "3.8" ] | index(env.version) then "pypy3" else "pypy" end -}}
32FROM mcr.microsoft.com/windows/{{ env.windowsVariant }}:{{ env.windowsRelease }}
43
54# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -68,8 +67,8 @@ RUN $url = '{{ .arches["windows-amd64"].url }}'; \
6867 Write-Host 'Renaming ...'; \
6968 Rename-Item -Path C:\{{ .arches["windows-amd64"].url | rtrimstr(".zip") | split("/")[-1] }} -NewName C:\pypy; \
7069 \
71- Write-Host 'Verifying install ("{{ cmd }} --version") ...'; \
72- {{ cmd }} --version; \
70+ Write-Host 'Verifying install ("pypy --version") ...'; \
71+ pypy --version; \
7372 \
7473 Write-Host 'Cleanup install ...'; \
7574 Get-ChildItem \
@@ -100,11 +99,11 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
10099 exit 1; \
101100 }; \
102101 \
103- $pipVersion = & {{ cmd }} -c 'import ensurepip; print(ensurepip._PIP_VERSION)'; \
104- $setuptoolsVersion = & {{ cmd }} -c 'import ensurepip; print(ensurepip._SETUPTOOLS_VERSION)'; \
102+ $pipVersion = & pypy -c 'import ensurepip; print(ensurepip._PIP_VERSION)'; \
103+ $setuptoolsVersion = & pypy -c 'import ensurepip; print(ensurepip._SETUPTOOLS_VERSION)'; \
105104 \
106105 Write-Host ('Installing "pip == {0}", "setuptools == {1}" ...' -f $pipVersion, $setuptoolsVersion); \
107- {{ cmd }} get-pip.py \
106+ pypy get-pip.py \
108107 --disable-pip-version-check \
109108 --no-cache-dir \
110109 ('pip == {0}' -f $pipVersion) \
@@ -131,4 +130,4 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
131130 \
132131 Write-Host 'Complete.'
133132
134- CMD {{ [ cmd ] | @json }}
133+ CMD ["pypy"]
0 commit comments