From: <sa...@us...> - 2008-01-04 09:57:54
|
Hi Roy, the C api to use datetime objects seems to be new in Python 2.4. So python-sybase cannot be compiled with the -DHAVE_DATETIME option with Python 2.3. You can correct this problem by applying the patch that I join to the setup.py file. This patch will be included in python-sybase 0.39. regards -- Sébastien Sablé Roy Smith a écrit : > I've got the following components: > > python-sybase-0.38 > freetds-0.64 > Python 2.3.4 (#1, Feb 2 2005, 11:44:13) > Red Hat Enterprise Linux AS release 4 (Nahant Update 3) > > When I try to build the sybase module, I get > > ---------------------------------------- > kirin:python-sybase-0.38$ python setup.py build_ext -D HAVE_FREETDS -U > WANT_BULKCOPY > running build_ext > building 'sybasect' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m64 > -D_GNU_SOURCE -fPIC -DHAVE_FREETDS -fPIC -DWANT_BULKCOPY -DSYB_LP64 > -DHAVE_DATETIME -DHAVE_FREETDS=1 -UWANT_BULKCOPY > -I/usr/local/freetds/include -I/usr/include/python2.3 -c sybasect.c -o > build/temp.linux-x86_64-2.3/sybasect.o > sybasect.c: In function `date_check': > sybasect.c:109: error: `PyDateTime_DateType' undeclared (first use in > this function) > sybasect.c:109: error: (Each undeclared identifier is reported only once > sybasect.c:109: error: for each function it appears in.) > sybasect.c: In function `initsybasect': > sybasect.c:1564: error: `PyDateTime_IMPORT' undeclared (first use in > this function) > error: command 'gcc' failed with exit status 1 > ---------------------------------------- > > Anybody have any clue what's going wrong? > > I've also got a deeper question (which probably exposes just how little > clue I have about this stuff). My end goal is to talk to a MS SQL > Server database running on a Windows box. My understanding is that the > combination of the python-sybase module and the FreeTDS driver will let > me do that. Is that correct? > > > > ------------------- > Roy Smith <smi...@em... <mailto:smi...@em...>> > Software Guy, EMC Common Management Group > 44 South Broadway, 7th floor > White Plains, NY 10601 > (914) 580-3427 > AIM: roysmith649 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Python-sybase-misc mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-sybase-misc |