Created
March 25, 2011 13:16
-
-
Save schmir/886821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py | |
index 2ca5f80..6aa79df 100644 | |
--- a/Lib/distutils/cygwinccompiler.py | |
+++ b/Lib/distutils/cygwinccompiler.py | |
@@ -60,6 +60,7 @@ def get_msvcr(): | |
"""Include the appropriate MSVC runtime library if Python was built | |
with MSVC 7.0 or later. | |
""" | |
+ return [] # don't link with msvcr90 when using mingw64 | |
msc_pos = sys.version.find('MSC v.') | |
if msc_pos != -1: | |
msc_ver = sys.version[msc_pos+6:msc_pos+10] | |
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py | |
index 7bf457d..ff30ffe 100644 | |
--- a/Lib/distutils/msvc9compiler.py | |
+++ b/Lib/distutils/msvc9compiler.py | |
@@ -254,6 +254,12 @@ def find_vcvarsall(version): | |
if not productdir: | |
log.debug("No productdir found") | |
return None | |
+ | |
+ vcvars = os.path.join(productdir, 'bin\\vcvars64.bat') | |
+ if os.path.isfile(vcvars): | |
+ return vcvars | |
+ raise RuntimeError('%r not found, need 64 bit sdk' % vcvars) | |
+ | |
vcvarsall = os.path.join(productdir, "vcvarsall.bat") | |
if os.path.isfile(vcvarsall): | |
return vcvarsall | |
diff --git a/include/pyconfig.h b/include/pyconfig.h | |
index c13f389..49c3e24 100644 | |
--- a/include/pyconfig.h | |
+++ b/include/pyconfig.h | |
@@ -100,6 +100,10 @@ WIN32 is still required for the locale module. | |
#define environ (NULL) | |
#endif | |
+#if defined(_WIN64) && !defined(MS_WIN64) | |
+#define MS_WIN64 | |
+#endif | |
+ | |
/* Compiler specific defines */ | |
/* ------------------------------------------------------------------------*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment