Skip to content

Commit eb09405

Browse files
timfelabdelberni
authored andcommitted
Remove workaround for Windows for discovering visual studio, we now use vswhere. Fixes #492
(cherry picked from commit 18d8563)
1 parent cde3208 commit eb09405

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,6 @@ public void postInitialize(Python3Core core) {
366366
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) {
367367
// XXX: Until we fix pip
368368
environ.setItem(toTruffleStringUncached("PIP_NO_CACHE_DIR"), toTruffleStringUncached("0"));
369-
// XXX: Until we have working winapi and winreg modules for MSVC discovery
370-
environ.setItem(toTruffleStringUncached("DISTUTILS_USE_SDK"), toTruffleStringUncached("1"));
371-
if (getenv.get("MSSdk") == null) {
372-
String sdkdir = getenv.get("WindowsSdkDir");
373-
if (sdkdir == null) {
374-
sdkdir = "unset";
375-
}
376-
environ.setItem(toTruffleStringUncached("MSSdk"), toTruffleStringUncached(sdkdir));
377-
}
378369
}
379370
PythonModule posix;
380371
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_WIN32) {

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ def getArchivableResultsWithLib(self, *args, **kwargs):
170170
if os.path.isfile(os.path.join(os.path.abspath(p), "cl.exe")):
171171
mx.log("LIB and INCLUDE set, cl.exe on PATH, assuming this is a VS shell")
172172
os.environ["DISTUTILS_USE_SDK"] = "1"
173+
if not os.environ.get("MSSdk"):
174+
os.environ["MSSdk"] = os.environ.get("WindowsSdkDir", "unset")
173175
break
174176
else:
175177
mx.log("cl.exe not on PATH, not a VS shell")

0 commit comments

Comments
 (0)