Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit b5c3f2b

Browse files
committed
Fix build error on Visual Studio >= 2010 (9.0)
1 parent 008771c commit b5c3f2b

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
@@ -6,6 +6,7 @@
66
import shutil
77
import sys
88
import tempfile
9+
import warnings
910

1011
try:
1112
from setuptools import Extension, setup
@@ -32,6 +33,10 @@
3233
]
3334

3435
if sys.platform == 'win32':
36+
try:
37+
os.environ['VS90COMNTOOLS'] = os.environ['VS110COMNTOOLS']
38+
except KeyError:
39+
warnings.warn('You probably need Visual Studio 2012 (11.0) or higher')
3540
flags = ['-I' + os.path.abspath('win32')]
3641
link_flags = []
3742
macros = {'LIBSASS_PYTHON_VERSION': '\\"' + version + '\\"'}

0 commit comments

Comments
 (0)