#15 build from src for cygwin

MySQLdb
closed
Andy Dustman
MySQLdb (53)
5
2012-09-19
2004-03-17
Anonymous
No

Hi,

Only had python installed on cygwin so the windows
installer failed. To build it from scratch I made these
changes (the thread-safe one is only because my client
isn't):

  • added '-lmySQL' link arg
  • changed cygwin paths to '/cygdrive/c/'

--- setup.py~ 2002-07-18 12:55:36.000000000 -0700
+++ setup.py 2004-03-17 15:04:40.053470800 -0800
@@ -11,7 +11,7 @@
NO = 0

# set this to YES if you have the thread-safe
mysqlclient library
-thread_safe_library = YES
+thread_safe_library = NO

# You probably don't have to do anything past this
point. If you
# do, please mail me the configuration for your
platform. Don't
@@ -46,7 +46,7 @@
# Sometimes the compiler or linker needs an extra
switch to make
# things work.
extra_compile_args = []
-extra_link_args = []
+extra_link_args = [ '-lmySQL' ]

if sys.platform == "netbsd1":
include_dirs = ['/usr/pkg/include/mysql']
@@ -65,8 +65,9 @@
'wsock32', 'advapi32']
extra_objects = [r'c:\mysql\lib\opt\mysqlclient.lib']
elif sys.platform == "cygwin":
- include_dirs = ['/c/mysql/include']
- library_dirs = ['/c/mysql/lib']
+ include_dirs = ['/cygdrive/c/mysql/include']
+ library_dirs = ['/cygdrive/c/mysql/lib/opt']
extra_compile_args.append('-DMS_WIN32')
elif sys.platform[:6] == "darwin": # Mac OS X
include_dirs.append('/sw/include')

Discussion

  • Andy Dustman
    Andy Dustman
    2004-05-16

    Logged In: YES
    user_id=71372

    Try a more recent version