Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c53587

Browse files
committed
fix setup.py to work with python3
1 parent 26cc77b commit 4c53587

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222

2323
def _find_msbuild_tool(tool="msbuild.exe", use_windows_sdk=False):
2424
"""Return full path to one of the microsoft build tools"""
25-
import _winreg
25+
try:
26+
import _winreg
27+
except ImportError:
28+
import winreg as _winreg
2629

2730
if use_windows_sdk:
2831
value_name = "InstallationFolder"

0 commit comments

Comments
 (0)