1
1
{{ def is_3: env.version | startswith("3") -}}
2
- {{ def cmd: if [ "3.8" ] | index(env.version) then "pypy3" else "pypy" end -}}
3
2
FROM mcr.microsoft.com/windows/{{ env.windowsVariant }}:{{ env.windowsRelease }}
4
3
5
4
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
@@ -68,8 +67,8 @@ RUN $url = '{{ .arches["windows-amd64"].url }}'; \
68
67
Write-Host 'Renaming ...'; \
69
68
Rename-Item -Path C:\{{ .arches["windows-amd64"].url | rtrimstr(".zip") | split("/")[-1] }} -NewName C:\pypy; \
70
69
\
71
- Write-Host 'Verifying install ("{{ cmd }} --version") ...'; \
72
- {{ cmd }} --version; \
70
+ Write-Host 'Verifying install ("pypy --version") ...'; \
71
+ pypy --version; \
73
72
\
74
73
Write-Host 'Cleanup install ...'; \
75
74
Get-ChildItem \
@@ -100,11 +99,11 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
100
99
exit 1; \
101
100
}; \
102
101
\
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)'; \
105
104
\
106
105
Write-Host ('Installing "pip == {0}", "setuptools == {1}" ...' -f $pipVersion, $setuptoolsVersion); \
107
- {{ cmd }} get-pip.py \
106
+ pypy get-pip.py \
108
107
--disable-pip-version-check \
109
108
--no-cache-dir \
110
109
('pip == {0}' -f $pipVersion) \
@@ -131,4 +130,4 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
131
130
\
132
131
Write-Host 'Complete.'
133
132
134
- CMD {{ [ cmd ] | @json }}
133
+ CMD ["pypy"]
0 commit comments