Building Python 2.5.6 on Ubuntu Natty

772 views
Skip to first unread message

Ricardo Bánffy

unread,
Jul 13, 2011, 10:41:07 AM7/13/11
to Google App Engine
Hi folks.

Has anyone succeeded in building Python 2.5.6 from sources in Ubuntu
Natty? I installed all the build dependencies and keep getting

running build_ext
/usr/include/sqlite3.h: version 3.7.4
Traceback (most recent call last):
File "./setup.py", line 1545, in <module>
main()
File "./setup.py", line 1540, in main
'Lib/smtpd.py']
File "/tmp/Python-2.5.6/Lib/distutils/core.py", line 151, in setup
File "/tmp/Python-2.5.6/Lib/distutils/dist.py", line 974, in run_commands
File "/tmp/Python-2.5.6/Lib/distutils/dist.py", line 994, in run_command
File "/tmp/Python-2.5.6/Lib/distutils/command/build.py", line 112, in run
File "/root/Python-2.5.6/Lib/cmd.py", line 333, in run_command
del help[cmd]
File "/tmp/Python-2.5.6/Lib/distutils/dist.py", line 994, in run_command
File "/tmp/Python-2.5.6/Lib/distutils/command/build_ext.py", line 290, in run
File "./setup.py", line 97, in build_extensions
self.detect_modules()
File "./setup.py", line 810, in detect_modules
sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))]
File "/root/Python-2.5.6/Lib/posixpath.py", line 119, in dirname
return split(p)[0]
File "/root/Python-2.5.6/Lib/posixpath.py", line 77, in split
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
make: *** [sharedmods] Error 1

when I do "make test" and

Compiling /opt/python2.5/lib/python2.5/zipfile.py ...
make: *** [libinstall] Error 1

when I do "make install"

Any ideas?

Is there any "official-ish" advice on how to develop for GAE under
Ubuntu Natty? Has anyone successfully compiled 2.5.6 under Natty?

--
Ricardo Bánffy
http://www.dieblinkenlights.com
http://twitter.com/rbanffy

Ernesto Oltra

unread,
Jul 14, 2011, 4:56:52 AM7/14/11
to google-a...@googlegroups.com
There is a repository of old python releases for several ubuntu versions. It's prebuilt, so you don't have to worry about compiling and installing:

  http://kovshenin.com/archives/installing-python-2-5-on-ubuntu-linux-10-10/

Danilo Penna Queiroz

unread,
Jul 14, 2011, 8:50:25 AM7/14/11
to google-a...@googlegroups.com
Hello all,

I maintain a ubuntu repository with python2.5, eclipse pydev plugin, and the GAE sdk, both python and java. All packages are ready to go just by using apt-get. 
The python's version is 2.5.5. In truth, it's the same package that Ernesto has posted here, i've just copied it to a unique repository.

Ricardo Bánffy

unread,
Jul 14, 2011, 6:53:48 PM7/14/11
to google-a...@googlegroups.com
That's great to hear. Thank you both Ernesto and Danilo for the help.

I borked my own Natty once trying to shoehorn 2.5 on it and wasn't
very happy with the idea of risking it again.

BTW, the build issue should be solved. It's not like the latest Ubuntu
release and Google's App Engine are obscure things. If someone from
python-devel happens to read this list, I'd be more than happy to help
if someone could point me the way.

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/4ZhIn1LOfpoJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

Andrew Ferk

unread,
Jul 21, 2011, 12:05:14 AM7/21/11
to google-a...@googlegroups.com
For now, you can modify line 804 by changing 'lib' to 'lib32'.

It looks like with Ubuntu, /usr/lib64 is a symbolic link to /usr/lib.  In line 802-809 of setup.py, sqlite3 is searched for in /usr/lib64 and /usr/lib (the same directories).  The sqlite3 library is in /usr/lib32.

I hope this helps.

Johan Euphrosine

unread,
Jul 21, 2011, 7:39:09 AM7/21/11
to google-a...@googlegroups.com
Hi Danilo,

Thanks a lot for sharing and maintaining this repository.

Feel free to advertise to the group when you are uploading new
packages versions. I'm sure Ubuntu users will appreciate this.

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/4ZhIn1LOfpoJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

--
Johan Euphrosine (proppy)
Developer Programs Engineer
Google Developer Relations

Awin Abi

unread,
Aug 16, 2011, 4:03:37 PM8/16/11
to Google App Engine
Refer to: http://99blues.dyndns.org/blog/2011/06/install_python_2-5/

after the ./configure open your Makefile and find the line with
LDFLAGS =

edit to LDFLAGS = -L/usr/lib//x86_64-linux-gnu

and make

Worked for me in Natty11.04 amd64
Reply all
Reply to author
Forward
0 new messages