diff options
author | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-05 00:38:57 +0000 |
---|---|---|
committer | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-05 00:38:57 +0000 |
commit | 11ade40463780e5fafdb6c82d1a76d0474e1cba5 (patch) | |
tree | 7c9b097fcdc54ec7172cfe2f89aa300cb8b614a4 /MySQLdb | |
parent | 54cc6fda9c496b633c506c7fd14a0d6f268f3a23 (diff) | |
download | mysqldb1-11ade40463780e5fafdb6c82d1a76d0474e1cba5.tar.gz |
Windows build fixes.
Diffstat (limited to 'MySQLdb')
-rw-r--r-- | MySQLdb/_mysql.c | 2 | ||||
-rw-r--r-- | MySQLdb/setup_windows.py | 6 | ||||
-rw-r--r-- | MySQLdb/site.cfg | 7 |
3 files changed, 6 insertions, 9 deletions
diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index d42cc54..6a1aa91 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -29,8 +29,6 @@ PERFORMANCE OF THIS SOFTWARE. #include "pymemcompat.h" #include "structmember.h" #if defined(MS_WINDOWS) -#include <winsock2.h> -#include <windows.h> #include <config-win.h> #else #include "my_config.h" diff --git a/MySQLdb/setup_windows.py b/MySQLdb/setup_windows.py index 411b773..c64b017 100644 --- a/MySQLdb/setup_windows.py +++ b/MySQLdb/setup_windows.py @@ -5,7 +5,7 @@ def get_config(): metadata, options = get_metadata_and_options() serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) - mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location') + connector = options["connector"] extra_objects = [] static = enabled(options, 'static') @@ -15,9 +15,9 @@ def get_config(): else: client = "mysqlclient" - library_dirs = [ os.path.join(mysql_root, r'lib\opt') ] + library_dirs = [ os.path.join(connector, r'lib\opt') ] libraries = [ 'kernel32', 'advapi32', 'wsock32', client ] - include_dirs = [ os.path.join(mysql_root, r'include') ] + include_dirs = [ os.path.join(connector, r'include') ] extra_compile_args = [ '/Zl' ] name = "MySQL-python" diff --git a/MySQLdb/site.cfg b/MySQLdb/site.cfg index 5413a1e..2bceb2b 100644 --- a/MySQLdb/site.cfg +++ b/MySQLdb/site.cfg @@ -12,7 +12,6 @@ static = False # setup that requires it. #mysql_config = /usr/local/bin/mysql_config -# The Windows registry key for MySQL. -# This has to be set for Windows builds to work. -# Only change this if you have a different version. -registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0 +# http://stackoverflow.com/questions/1972259/mysql-python-install-problem-using-virtualenv-windows-pip +# Windows connector libs for MySQL. You need a 32-bit connector for your 32-bit Python build. +connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2
\ No newline at end of file |