MCPcopy Create free account
hub / github.com/numpy/numpy / _dist_test_spawn_paths

Method _dist_test_spawn_paths

numpy/distutils/ccompiler_opt.py:730–743  ·  view source on GitHub ↗

Fix msvc SDK ENV path same as distutils do without it we get c1: fatal error C1356: unable to find mspdbcore.dll

(self, cmd, display=None)

Source from the content-addressed store, hash-verified

728 return start + out
729
730 def _dist_test_spawn_paths(self, cmd, display=None):
731 """
732 Fix msvc SDK ENV path same as distutils do
733 without it we get c1: fatal error C1356: unable to find mspdbcore.dll
734 """
735 if not hasattr(self._ccompiler, "_paths"):
736 self._dist_test_spawn(cmd)
737 return
738 old_path = os.getenv("path")
739 try:
740 os.environ["path"] = self._ccompiler._paths
741 self._dist_test_spawn(cmd)
742 finally:
743 os.environ["path"] = old_path
744
745 _dist_warn_regex = re.compile(
746 # intel and msvc compilers don't raise

Callers

nothing calls this directly

Calls 1

_dist_test_spawnMethod · 0.95

Tested by

no test coverage detected