Skip to content

Commit 362f2dd

Browse files
committed
remove msvc hack
does not apply on latest setuptools
1 parent e468db2 commit 362f2dd

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

Diff for: setup.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,7 @@ def customize_compiler(compiler):
9696
elif filename.endswith('.h'):
9797
headers.append(filename)
9898

99-
if sys.platform == 'win32':
100-
from distutils.msvc9compiler import get_build_version
101-
vscomntools_env = 'VS{}{}COMNTOOLS'.format(
102-
int(get_build_version()),
103-
int(get_build_version() * 10) % 10,
104-
)
105-
try:
106-
os.environ[vscomntools_env] = os.environ['VS140COMNTOOLS']
107-
except KeyError:
108-
distutils.log.warn(
109-
'You probably need Visual Studio 2015 (14.0) '
110-
'or higher',
111-
)
112-
from distutils import msvccompiler, msvc9compiler
113-
if msvccompiler.get_build_version() < 14.0:
114-
msvccompiler.get_build_version = lambda: 14.0
115-
if get_build_version() < 14.0:
116-
msvc9compiler.get_build_version = lambda: 14.0
117-
msvc9compiler.VERSION = 14.0
118-
elif platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}:
99+
if platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}:
119100
# Dirty workaround to avoid link error...
120101
# Python distutils doesn't provide any way
121102
# to configure different flags for each cc and c++.

0 commit comments

Comments
 (0)