@@ -28,25 +28,28 @@ Invoke-WebRequest -Uri "https://bootstrap.pypa.io/get-pip.py" -Out "get-pip.py"
28
28
29
29
if ($True -eq $InstallVirtualenv ) {
30
30
& .\${PythonDirectory} \python.exe - m pip install virtualenv
31
+ }
31
32
32
- # Virtualenv helper files must be extracted from main python.
33
- # Embedded version does not contain working copy for virtualenv.
34
- # If Python is not available then install one
35
- if ($null -eq (Get-Command " python.exe" - ErrorAction SilentlyContinue)) {
36
- Invoke-WebRequest - Uri " https://www.python.org/ftp/python/${PythonVersion} /python-${PythonVersion} -amd64.exe" - Out " python-amd64.exe"
37
- .\python-amd64.exe / quiet / passive TargetDir= ${pwd} \temp- python3
38
- $InstallerProcess = Get-Process python- amd64
39
- Wait-Process - Id $InstallerProcess.id
40
- $PythonVenvScripts = temp- python3\Lib\venv\scripts\nt
41
- } else {
33
+ # Venv helper files must be extracted from main python.
34
+ # Embedded version does not contain working copy for virtualenv.
35
+ # If Python is not available then install one
36
+ if ($null -eq (Get-Command " python.exe" - ErrorAction SilentlyContinue)) {
37
+ Invoke-WebRequest - Uri " https://www.python.org/ftp/python/${PythonVersion} /python-${PythonVersion} -amd64.exe" - Out " python-amd64.exe"
38
+ .\python-amd64.exe / quiet / passive TargetDir= ${pwd} \temp- python3
39
+ $InstallerProcess = Get-Process python- amd64
40
+ Wait-Process - Id $InstallerProcess.id
41
+ $PythonVenvScripts = temp- python3\Lib\venv\scripts\nt
42
+ } else {
43
+ if ($True -eq $InstallVirtualenv ) {
42
44
python - m pip install virtualenv
43
45
python - m virtualenv temp- python3
44
- $PythonVenvScripts = " temp-python3\Scripts"
45
46
}
46
- mkdir ${PythonDirectory} \Lib\venv\scripts\nt
47
- Copy-Item ${PythonVenvScripts} \python.exe ${PythonDirectory} \Lib\venv\scripts\nt
48
- Copy-Item ${PythonVenvScripts} \pythonw.exe ${PythonDirectory} \Lib\venv\scripts\nt
47
+ $PythonVenvScripts = " temp-python3\Scripts"
49
48
}
50
49
50
+ mkdir ${PythonDirectory} \Lib\venv\scripts\nt
51
+ Copy-Item ${PythonVenvScripts} \python.exe ${PythonDirectory} \Lib\venv\scripts\nt
52
+ Copy-Item ${PythonVenvScripts} \pythonw.exe ${PythonDirectory} \Lib\venv\scripts\nt
53
+
51
54
# Create final zip - GitHub performs compression of artifacts automatically
52
55
Compress-Archive - Path " python\*" - DestinationPath " python.zip"
0 commit comments