tmolomby / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

dropped support for python 2.5 ? #227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. clone pyodbc source
2. execute following command in command line.
d:\prj\pysrc_build\pyodbc_git>setup.py build -c mingw32 bdist_wininst

What is the expected output? What do you see instead?
pyodbc installer for python 2.5 is expected, but compile error occurred.
D:\prj\pysrc_build\pyodbc_git>setup.py build -c mingw32 bdist_wininst
WARNING: git describe failed with: 1
WARNING: Unable to determine version.  Using 3.0.0.0
C:\devtool\py25x86\lib\distutils\dist.py:263: UserWarning: Unknown distribution 
option: 'options'
  warnings.warn(msg)
running build
running build_ext
building 'pyodbc' extension
c:\devtool\mingw_tdm\bin\gcc.exe -mdll -O -Wall 
-DPYODBC_VERSION=3.0.0-unsupported -IC:\devtool\py25x86\include 
-IC:\devtool\py25x86\PC -c D:\prj\pysrc_build\pyodbc_git\src\buffer.cpp -o 
d:\prj\pysrc_build\pyodbc_git\src\buffer.o
In file included from D:\prj\pysrc_build\pyodbc_git\src\buffer.cpp:12:0:
D:\prj\pysrc_build\pyodbc_git\src\pyodbc.h:47:25: fatal error: bytesobject.h: 
No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
What version of the product are you using? On what operating system?
Python 2.5.4 32bit
tdm-gcc 4.6.1 32bit
Windows 7 64bit

Please provide any additional information below.
bytesobject.h file don't exist in python25/include.
Compile error don't occur in Python 2.6/2.7 and bytesobject.h file exist in 
python26/include and python27/include.

Original issue reported on code.google.com by marun...@gmail.com on 28 Dec 2011 at 5:04

GoogleCodeExporter commented 9 years ago
It wasn't purposely dropped.  I was concentrating on building for both Python 2 
& 3 simultaneously, but I didn't have the 2.5 compiler available on Windows.

Testing for 2.6, 2.7, 3.2 with 64-bit and 32-bit versions on 3 OSes was 
tedious, but I will ensure 2.4 and 2.5 build.

Thanks for the heads up.

Original comment by mkleehammer on 28 Dec 2011 at 10:28

GoogleCodeExporter commented 9 years ago
I used tdm-gcc to build pyodbc for python 2.5.
You can download tdm-gcc installer from http://tdm-gcc.tdragon.net/download
After install tdm-gcc, add tdm-gcc\bin folder to PATH environment.
And, execute following command in command line.
d:\prj\pysrc_build\pyodbc_git>setup.py build -c mingw32 bdist_wininst

pyodbc installer builded well with python 2.6 and 2.7.

Original comment by marun...@gmail.com on 29 Dec 2011 at 9:04

GoogleCodeExporter commented 9 years ago
I too, wanted to try the new pyodbc together with python 2.5 and found these 
problems.

I cloned the project and did some changes so that it built OK for me. I tried 
it out on Linux and Solaris (since that's where I need to use Python2.5) and it 
seems ok.

You can check it out yourself here:
https://code.google.com/r/pythoncurious-pyodbc-python25-support/

Mike, feel free to bring it into pyodbc if you think it is good enough. 
some of the #if code isn't that pretty as it breaks up the blocks and there is 
a place where the version check used to be for 2.6 instead of 3. Not sure if 
that should have remained.
Have a look and see if it makes sense what I did. 

If nothing else, I spend a few hours learning something :)

Original comment by pythoncurious on 8 Jan 2012 at 1:04

GoogleCodeExporter commented 9 years ago
Thank you.
pyodbc installer for python 2.5 is build without problem using 
https://code.google.com/r/pythoncurious-pyodbc-python25-support/.
Also, simple test works well - connect, execute select query, print result, 
close.
I will test more :)

Original comment by marun...@gmail.com on 12 Jan 2012 at 4:50

GoogleCodeExporter commented 9 years ago
Fixed in 3.0.4.  I'm uploading an installer too.  I've updated my primary 
Windows box with the necessary compiler, so I'll generate 2.5 builds for all 
new releases.

Thanks guys.  I ultimately took a different approach and created the same 
macros as byteobjects.h for previous versions of Python.

Original comment by mkleehammer on 13 Jan 2012 at 7:28

GoogleCodeExporter commented 9 years ago
That approach looks better than what I did. :) So for anyone who tries to 
follow the link above: I'm discontinuing the fork I made.

Original comment by pythoncurious on 15 Jan 2012 at 5:56