Skip to content

Commit d324320

Browse files
authored
Update setup.py
1 parent c860bb9 commit d324320

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ def main():
160160
# Raw paths relative to sourcetree root.
161161
files_outside_package_dir = {"cv2": ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]}
162162

163-
windows_version = int(platform.release())
164-
print(windows_version)
165163
if os.name == "nt":
166-
if windows_version == 10:
167-
generator_name = "Visual Studio 17"
164+
vs_env = os.environ.get("VISUAL_STUDIO")
165+
if vs_env == "17":
166+
generator_name = "Visual Studio 17"
168167
else:
169168
enerator_name = "Visual Studio 14"
170169
ci_cmake_generator = ["-G", generator_name + (" Win64" if is64 else "")]

0 commit comments

Comments
 (0)