Skip to content

Commit 40559be

Browse files
committed
Refactor MSVC setup action for Python 2.7
1 parent 57d82d9 commit 40559be

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/actions/setup-msvc/action.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ runs:
2323
exit 1;
2424
}
2525
Invoke-WebRequest ${{ env.VS090URL }} -OutFile VCForPython27.msi
26-
$msi_process = Start-Process "msiexec" -NoNewWindow -PassThru `
27-
-ArgumentList "/i VCForPython27.msi /qn /l*! output.log"
28-
$msi_process.WaitForExit()
26+
(Start-Process "msiexec" -NoNewWindow -PassThru -ArgumentList `
27+
"/i VCForPython27.msi /qn /l*! output.log").WaitForExit()
2928
$MSVCVARS = "VCINSTALLDIR", "WindowsSdkDir", "PATH", "LIB", "LIBPATH", "INCLUDE"
30-
$env:MSVCROOT = "C:\Users\$env:UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0"
31-
cmd.exe /c '"%MSVCROOT%\vcvarsall.bat" ${{ inputs.arch }} && set' |
32-
foreach-object {
29+
$MSVCROOT = "C:\Users\$env:UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0"
30+
cmd.exe /c "`"${MSVCROOT}\vcvarsall.bat`" ${{ inputs.arch }} && set" |
31+
ForEach-Object {
3332
$name, $value = $_ -split '=', 2
34-
if ($MSVCVARS -contains $name) {
35-
echo $name $value
33+
if (${MSVCVARS} -contains $name) {
3634
echo $_ >> $env:GITHUB_ENV
3735
}
3836
}

.github/workflows/basemap-data-hires.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
PKGDIR: "packages/basemap_data_hires"
55

66
on:
7+
push:
78
workflow_dispatch:
89

910
jobs:

.github/workflows/basemap-data.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
PKGDIR: "packages/basemap_data"
55

66
on:
7+
push:
78
workflow_dispatch:
89

910
jobs:

.github/workflows/basemap-for-manylinux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
PKGDIR: "packages/basemap"
55

66
on:
7+
push:
78
workflow_dispatch:
89

910
jobs:

0 commit comments

Comments
 (0)