Skip to content

Commit

Permalink
Add msvc module for installing MSVC using the command line.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 6, 2021
1 parent 42803e2 commit 390086f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions jaraco/windows/msvc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import subprocess


default_components = [
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Workload.WDExpress',
]


def install(components=default_components):
cmd = ['vs_buildtools', '--quiet', '--wait', '--norestart', '--nocache']
for component in components:
cmd += ['--add', component]
res = subprocess.Popen(cmd).wait()
if res != 3010:
raise SystemExit(res)


__name__ == '__main__' and install()

0 comments on commit 390086f

Please sign in to comment.