Skip to content

Commit 35e3b28

Browse files
committed
Use msbuild tools from PATH
While _find_msbuild_tool searches in the registry to find the given build tool, it doesn't check if it's already in PATH. If one uses a developer command prompt to build, all necessary tools are in PATH. Fixes #207 for me
1 parent 6139989 commit 35e3b28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from distutils.command.install_lib import install_lib
88
from distutils.command.install_data import install_data
99
from distutils.sysconfig import get_config_var
10+
from distutils.spawn import find_executable
1011
from distutils import log
1112
from platform import architecture
1213
from subprocess import Popen, CalledProcessError, PIPE, check_call
@@ -23,6 +24,10 @@
2324

2425
def _find_msbuild_tool(tool="msbuild.exe", use_windows_sdk=False):
2526
"""Return full path to one of the microsoft build tools"""
27+
path = find_executable(tool)
28+
if path:
29+
return path
30+
2631
try:
2732
import _winreg
2833
except ImportError:

0 commit comments

Comments
 (0)