missing FCNTL.py after building Zope 2.3 on Python 1.5.2
Hello: 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" . Lookign around found that this FCNTL.py has to be manually created (at least on some Python installations) with the Python utility h2py which, in my machine is at ~[PythonBaseDir]/Python-1.5.2/Tools/scripts/h2py.py and giving the path of fcntl.h as its argument so: [PythonDir]/Python-1.5.2/Tools/scripts/h2py.py /usr/include/fcntl.h I did this standing at the /usr/local/Zope directory where I just untarred Zope. The h2py script created the FCNTL.py right on the Zope home directory, now it runs correctly. My question is ¿has anyone seen this before? , It never happened to me on Zope versions earlier than 2.3 and 2.3 betas ) Seems like there is something missing either on the Python RPM install or on the Zope install..... Comments Suggestions ? 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 - ...? Thanks and regards. Felipe Barousse Bufete Consultor de Mexico Piensa Technology www.piensa.com
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 brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
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
participants (3)
-
Brian Lloyd -
Felipe E. Barousse Boue -
Steven D. Majewski