My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 227: dropped support for python 2.5 ?
3 people starred this issue and may be notified of changes. Back to list
Status:  Complete
Owner:  ----
Closed:  Jan 2012


 
Reported by marun...@gmail.com, Dec 27, 2011
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.
Dec 28, 2011
Project Member #1 mkleehammer
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.
Status: Accepted
Dec 29, 2011
#2 marun...@gmail.com
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.
Jan 8, 2012
#3 pythoncurious
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 :)
Jan 11, 2012
#4 marun...@gmail.com
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 :)
Jan 13, 2012
Project Member #5 mkleehammer
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.

Status: Complete
Jan 15, 2012
#6 pythoncurious
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.

Powered by Google Project Hosting