A hacker (Adam Langley) tried to install Tahoe the other day and this issue prevented it from working on the first try. The symptom was that Adam got this stack trace from installation:
File "/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 27, in run_setup
File "/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 63, in run
File "/home/agl/src/allmydata-tahoe-1.0.0-r2613/setuptools-0.6c8.egg/setuptools/sandbox.py",
line 29, in <lambda>
File "setup.py", line 8, in <module>
#
File "/tmp/easy_install-fqJkNC/Nevow-0.9.18/setupcommon.py", line 2,
in <module>
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 10, in <module>
#
ImportError: No module named components
I am able to reproduce this with a minimal project which depends on Nevow and which installs Twisted at build time, like Tahoe does. Here is the setup.py for that minimal project:
import setuptools
setuptools.setup(name="minproj_that_needs_nevow", setup_requires=["Twisted"], install_requires=["Nevow"]
I get a different, much clearer, error message for a minimal project which simply depends on Nevow, whose setup.py looks like this:
import setuptools
setuptools.setup(name="minproj_that_needs_nevow", install_requires=["Nevow"]
That project fails to install with this stack trace:
File "/usr/local/stow/python-release25-maint-2008-05-30/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/setuptools/sandbox.py", line 29, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 8, in <module>
File "/tmp/easy_install-jk5WWL/Nevow-0.9.31/setupcommon.py", line 2, in <module>
File "/tmp/easy_install-jk5WWL/Nevow-0.9.31/nevow/__init__.py", line 5, in <module>
File "/tmp/easy_install-jk5WWL/Nevow-0.9.31/nevow/_version.py", line 2, in <module>
ImportError: No module named twisted.python
The way that Nevow could declare its dependency on Twisted in such a way that the Tahoe install process could detect it would be the same way that Twisted currently declares its dependency on zope.interface:
http://twistedmatrix.com/trac/browser/trunk/setup.py?rev=23010#L75
It would look like this:
setup_args['install_requires'] = ['Twisted']