summaryrefslogtreecommitdiffstats
path: root/src/setup.py
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2015-12-24 16:32:14 (GMT)
committerRussel Winder <russel@winder.org.uk>2015-12-24 16:32:14 (GMT)
commit2a270c8f314e959c78e9deda29c8f250bb934dd6 (patch)
tree7008e644357036404f0861c8ba1bbbf43b2b4123 /src/setup.py
parenta7d764ed831fa3243aa0bd3307f641e1e1f9f8a8 (diff)
parent9d558dd65deacc958edc1f0da2dab1ec56ff4e4e (diff)
downloadSCons-2a270c8f314e959c78e9deda29c8f250bb934dd6.zip
SCons-2a270c8f314e959c78e9deda29c8f250bb934dd6.tar.gz
SCons-2a270c8f314e959c78e9deda29c8f250bb934dd6.tar.bz2
Post merge commit for safety. Building Fortran code works, but tests fail.
Diffstat (limited to 'src/setup.py')
-rw-r--r--src/setup.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/setup.py b/src/setup.py
index 2c75c60..c036fb0 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -73,6 +73,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
@@ -325,7 +335,7 @@ class install_scripts(_install_scripts):
self.copy_scons(src, scons_version_bat)
# --- distutils copy/paste ---
- if os.name == 'posix':
+ if hasattr(os, 'chmod') and hasattr(os,'stat'):
# Set the executable bits (owner, group, and world) on
# all the scripts we just installed.
for file in self.get_outputs():