CygWin ODBC

Steve Holden steve at holdenweb.com
Fri May 27 11:27:45 EDT 2005


Simon Faulkner wrote:
> Hi All,
> 
> I am new to Cygwin and am hoping that someone here will be able to tell 
> me how to get ODBC running in Python on Cygwin.
> 
> Maximum gratefullness...
> 
> 
> Simon

There's a trick to this which involves recompiling from source. If you 
aren't experienced with Unix/Linux this might seem a bit intimidating.

The latest version I worked on is mxODBC 2.0.7. If Egenix have released 
something later it may incorporate these changes. Sorry they aren't 
"diff -c" format.

I also remember the need in the past to rename some ".cpp" files to 
".c", but I believe this has now been done in the distributions.

regards
  Steve

diff -rc egenix-mx-commercial-2.0.7/mxCOMMERCIAL.py 
egenix-mx-commercial-2.0.7cygwin/mxCOMMERCIAL.py
*** egenix-mx-commercial-2.0.7/mxCOMMERCIAL.py  Wed Dec  1 13:10:27 2004
--- egenix-mx-commercial-2.0.7cygwin/mxCOMMERCIAL.py    Sat Dec 18 
09:56:27 2004
***************
*** 55,61 ****
   packages = ['mx.ODBC',
               'mx.ODBC.Misc']

! if sys.platform[:3] == 'win':
       packages[len(packages):] = [

           'mx.ODBC.Windows'
--- 55,61 ----
   packages = ['mx.ODBC',
               'mx.ODBC.Misc']

! if sys.platform[:3] == 'win' or sys.platform == 'cygwin':
       packages[len(packages):] = [

           'mx.ODBC.Windows'
***************
*** 89,95 ****
   #
   ext_modules = []

! if sys.platform[:3] == 'win':
       ext_modules[len(ext_modules):] = [

           Extension('mx.ODBC.Windows.mxODBC',
--- 89,95 ----
   #
   ext_modules = []

! if sys.platform[:3] == 'win' or sys.platform == 'cygwin':
       ext_modules[len(ext_modules):] = [

           Extension('mx.ODBC.Windows.mxODBC',
***************
*** 167,173 ****

   ]

! if sys.platform[:3] == 'win':
       data_files[len(data_files):] = [

           'mx/ODBC/Windows/COPYRIGHT',
--- 167,173 ----

   ]

! if sys.platform[:3] == 'win' or sys.platform == 'cygwin':
       data_files[len(data_files):] = [

           'mx/ODBC/Windows/COPYRIGHT',

-- 
Steve Holden        +1 703 861 4237  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/




More information about the Python-list mailing list