Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2006 02:45:06 -0400
From:      Isaac Levy <ike@lesmuug.org>
To:        beno <zope@2012.vi>
Cc:        freebsd-python@freebsd.org
Subject:   Re: Reinstalling Python with mod_python Problem
Message-ID:  <AED67FDE-02EA-471C-82EA-8359F22DF0A6@lesmuug.org>
In-Reply-To: <44CFF018.3030706@2012.vi>
References:  <44CFF018.3030706@2012.vi>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Beno,

On Aug 1, 2006, at 8:21 PM, beno wrote:

> It's been years since I've done this. I had a programmer working  
> for me who disappeared one day, and now I'm taking over his  
> responsibilities. I need to re-configure Apache for mod_python  
> which means I have to rebuild python.

Yes, go clean.

> I'm working with the latest distro. I'm heavily dependent on zope,  
> so all this has to work together.

Suggestion:

If this is all new to you, and debugging cross-incompatibilities is  
not what you want to be doing, I'd suggest you do:

First, make sure your system is up to date, and for Zope, make  
certain you have up-to-date Zlib and Expat installed (easiest from  
ports).

Compile one python and let it all live in /usr/local (default when  
NOT specifying --prefix during the install), track down and see if  
any other Python installs exist on the machine.
You shouldn't need to toss ANY flags at the Python build for that  
matter, it will work AOK with mod_python and Zope.

Then, depending on your vintage of Zope, you should be prepared to  
compile a python *just for zope*, if things go haywire somehow...   
This makes it so you can isolate the apps from each other while you  
sort out your predecessor's apps.


> Platform is FreeBSD 5.3. I have the following questions:
>
> What is meant by pointing to this folder thus:
> ./configure --prefix=/usr/python

This configure statement means that you are isolating python, (and  
associated libs, man pages, etc...) from the rest of the system.   
This kind of thing can lead to tremendous person-specific messes, I'd  
highly suggest a quick flip through 'man hier' for some more standard  
ways of doing things.
It's just my take after years of this kind of web-app complexity, but  
as long as you know where stuff is, it really doesn't matter where  
you install things.

>
> When I run make test I get these errors:
>
> 2 tests failed:
>   test_mimetools test_urllib2

The 2 failed tests:

test_mimetools, test_urllib2 are no big deal at all.  Python's  
standard library is vast, but not much of it is intended for  
'production' type application, aside from rapid prototyping, etc...
What I'm getting at is that the authors of Zope, as well as  
mod_apache, will be nary to use much of the Python Standard Library,  
insomuch as the API's for those modules can and do change over time.   
(Think of them as analagous to /usr/bin vs. /bin).

With that, simply grok your predessor's code to see if he/she used  
either mimetools or urllib2, and if he/she didn't, you'r good to go.
If not, google for the modules and dive down that rabbit hole.


> 48 tests skipped:
>   test_aepack test_al test_applesingle test_asynchat test_bsddb
>   test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
>   test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
>   test_doctest test_fork1 test_gdbm test_gl test_imgfile test_imp
>   test_linuxaudiodev test_logging test_macfs test_macostools
>   test_nis test_normalization test_ossaudiodev test_pep277
>   test_plistlib test_queue test_scriptpackages test_socket
>   test_socket_ssl test_socketserver test_sunaudiodev test_tcl
>   test_thread test_threaded_import test_threadedtempfile
>   test_threading test_threading_local test_threadsignals
>   test_timeout test_unicode_file test_urllib2net test_urllibnet
>   test_winreg test_winsound

A few of these stand out to me, like socket, etc... though most are  
normal and sane.

Are you perhaps working inside a FreeBSD jail?  (or otherwise working  
on a box somehow restricting sockets?)  Just curious- don't worry  
about this.

> 13 skips unexpected on freebsd5:
>   test_threadedtempfile test_imp test_threaded_import test_fork1
>   test_threading test_threadsignals test_socket test_thread
>   test_queue test_asynchat test_doctest test_threading_local
>   test_logging

These skipped tests, are just common sense stuff- depending on how  
you have your kernel compiled on your host, and how tweaked out you  
are with your Python.  (basically, if you need this stuff, you'd  
definately know which ones and why, so don't worry and move on).

> *** Error code 1
>
> What do I do about those failed tests? I've googled this with no  
> luck. Please advise what to do or at least how to start

Hope my comments above help, feel free to continue on list if I didn't.

Best,
.ike






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AED67FDE-02EA-471C-82EA-8359F22DF0A6>