Skip to content

Commit

Permalink
Getting closer to identifying why setuptools doesn't see the build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 6, 2021
1 parent 1fc4d77 commit 42803e2
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
# Download the Build Tools bootstrapper.
ADD https://aka.ms/vs/16/release/vs_buildtools.exe vs_buildtools.exe

# Install Visual Studio
RUN ./vs_buildtools.exe --quiet --wait --norestart --nocache \
--add Microsoft.VisualStudio.Component.CoreEditor \
--add Microsoft.VisualStudio.Workload.CoreEditor \
--add Microsoft.VisualStudio.Component.Roslyn.Compiler \
--add Microsoft.Component.MSBuild \
--add Microsoft.VisualStudio.Component.TextTemplating \
--add Microsoft.VisualStudio.Component.VC.CoreIde \
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 \
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest \
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core \
--add Microsoft.VisualStudio.Workload.NativeDesktop

# Install chocolatey
RUN powershell -c "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex"
RUN choco feature enable -n allowGlobalConfirmation
Expand All @@ -41,4 +27,23 @@ RUN cmd /c 'certutil -generateSSTFromWU roots.sst && certutil -addstore -f root

RUN setx TOX_WORK_DIR \tox

# Install Visual Studio
RUN cmd /c start /w vs_buildtools --quiet --wait --norestart --nocache modify \
--add Microsoft.VisualStudio.Component.CoreEditor \
--add Microsoft.VisualStudio.Workload.CoreEditor \
--add Microsoft.VisualStudio.Component.Roslyn.Compiler \
--add Microsoft.Component.MSBuild \
--add Microsoft.VisualStudio.Component.TextTemplating \
--add Microsoft.VisualStudio.Component.VC.CoreIde \
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 \
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest \
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core \
--add Microsoft.VisualStudio.Workload.NativeDesktop \
--add Microsoft.VisualStudio.Workload.WDExpress

RUN & \"${env:programfiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe\" -latest -prerelease -requiresAny -property installationPath -products *

RUN py -c 'from setuptools import msvc; print(msvc._msvc14_find_vc2017())'

ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

0 comments on commit 42803e2

Please sign in to comment.