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

Commit 9d3268a

Browse files
committed
1 parent b5c3f2b commit 9d3268a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@
3737
os.environ['VS90COMNTOOLS'] = os.environ['VS110COMNTOOLS']
3838
except KeyError:
3939
warnings.warn('You probably need Visual Studio 2012 (11.0) or higher')
40+
# Workaround http://bugs.python.org/issue4431 under Python <= 2.6
41+
if sys.version < (2, 7):
42+
def spawn(self, cmd):
43+
from distutils.spawn import spawn
44+
if cmd[0] == self.linker:
45+
for i, val in enumerate(cmd):
46+
if val.startswith('/MANIFESTFILE:'):
47+
spawn(cmd[:i] + ['/MANIFEST'] + cmd[i:],
48+
dry_run=self.dry_run)
49+
break
50+
spawn(cmd, dry_run=self.dry_run)
51+
from distutils.msvc9compiler import MSVCCompiler
52+
MSVCCompiler.spawn = spawn
4053
flags = ['-I' + os.path.abspath('win32')]
4154
link_flags = []
4255
macros = {'LIBSASS_PYTHON_VERSION': '\\"' + version + '\\"'}

0 commit comments

Comments
 (0)