Re: [Zope] missing FCNTL.py after building Zope 2.3 on Python 1.5.2

2001-01-29 Thread Steven D. Majewski


I'm not sure exactly how the problem manifests itself in 1.5.2, but 
in 1.6 & later, there are a series of platform specific directories:
Lib/plat-{XXX} where XXX is some system, and a Lib/plat-generic/. 
That's where the FCNTL and some other files live.

If your system is not among the ones included in the distribution, it
has to build those system dependent files from the regen script in 
Lib/plat-generic/. 

It should probably be considered a bug of the build/makefile system
that that step does not get done when building Python, but only on
'make install' .  If you do a 'make test' before doing 'make install',
and it's your first build on a 'generic' platorm, it will always fail
for those ( FCNTL.py, TERMIOS.py, ... ) files. 

-- Steve Majewski 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] missing FCNTL.py after building Zope 2.3 on Python 1.5.2

2001-01-29 Thread Brian Lloyd

> Are there any comments regarding the missing of a module named FCNTL.py
> ?
> 
> It happens that I just built Zope 2.3 from source on a Python 1.5.2
> installation and after compiling and building successfully just after
> the "./start" command, Zope crases with a "no module named FCNTL" .

This is odd - it actually crashes? The only part of the code 
that tries to use FCNTL is in the __init__.py of ZServer:


try:
import fcntl, FCNTL
FCNTL.F_SETFD; FCNTL.FD_CLOEXEC
def requestCloseOnExec(sock):
try:fcntl.fcntl(sock.fileno(), FCNTL.F_SETFD, FCNTL.FD_CLOEXEC)
except: pass

except (ImportError, AttributeError):

def requestCloseOnExec(sock):
pass


...and it is specifically designed to fail gracefully if FCNTL 
support is not available. The fact that you are getting an 
error message of "no module named FCNTL" makes it _sound_ like 
an ImportError, which should be caught. Can you send me a copy 
of the whole traceback (maybe we are somehow getting something 
other than ImportError)?



> Just by the way, recommended  trustworthy ways to find out if the Python
> installation has been compiled with threads enabled -besides knowing
> that it is a plain vanilla RPM install and what that may or may not
> imply - ...?

Start python from the command line and try:

import thread

if you get an ImportError, threading is probably not compiled
in...


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )