summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2015-02-15 13:02:51 -0800
committerWilliam Deegan <bill@baddogconsulting.com>2015-02-15 13:02:51 -0800
commitadaa01f98410d2fc32658a1a55feb7c2f8e707f1 (patch)
tree175f964c1136e7322c0a0d06913d4de25ad24ce0
parente590579d7080128a86e092cdac48c6b43b6998b2 (diff)
downloadscons-adaa01f98410d2fc32658a1a55feb7c2f8e707f1.tar.gz
monkey patch the get_build_version() function in distutils msvccompiler.py because if it's being run on a non-windows platform it always defaults to use msvc version 6, which doesn't provide a 64 bit installer boilerplate. Switching to 9 should work with python 2.7.x
-rw-r--r--src/setup.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/setup.py b/src/setup.py
index a8b59a32..fb16bddb 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -81,6 +81,16 @@ import distutils.command.install_data
import distutils.command.install_lib
import distutils.command.install_scripts
import distutils.command.build_scripts
+import distutils.msvccompiler
+
+def get_build_version():
+ """ monkey patch distutils msvc version if we're not on windows.
+ We need to use vc version 9 for python 2.7.x and it defaults to 6
+ for non-windows platforms and there is no way to override it besides
+ monkey patching"""
+ return 9
+
+distutils.msvccompiler.get_build_version = get_build_version
_install = distutils.command.install.install
_install_data = distutils.command.install_data.install_data