zc.buildout fails to use code from dist-packages

Bug #685638 reported by Alan Franzoni
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

It seems that zc.buildout (sometimes?) fails to use the code which is available - and that it finds - in dist-packages; I could verify this on python2.6, Ubuntu 10.10 - both 32 and 64 bit - through the following script:

# start
cd /tmp
mkdir -p MyProj/myproj
cd MyProj
cat <<EOM > buildout.cfg
[buildout]
parts = test
develop = myproj

[test]
recipe = zc.recipe.testrunner
eggs = myproj

EOM

cat <<EOM > myproj/setup.py
from setuptools import setup
setup(
       name="myproj",
       version="1.0.0",
       description="myproj"
       )

EOM
wget http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py

python bootstrap.py && bin/buildout -vvv
bin/test
#end

alan@afra:/tmp/MyProj$ python bootstrap.py --distribute && bin/buildout
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Extracting in /tmp/tmpUAAumj
Now working in /tmp/tmpUAAumj/distribute-0.6.14
[...] cut [...]
Got zope.exceptions 3.6.1.
Installing test.
Generated script '/tmp/MyProj/bin/test'.
alan@afra:/tmp/MyProj$ bin/test
Traceback (most recent call last):
 File "bin/test", line 20, in <module>
   import zope.testrunner
 File "/tmp/MyProj/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/__init__.py",
line 21, in <module>
   import zope.testrunner.interfaces
 File "/tmp/MyProj/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/interfaces.py",
line 21, in <module>
   import zope.interface
ImportError: No module named interface

Full log after verbose run is attached.

The same thing can't be reproduced on Gentoo, MacOSX.

Revision history for this message
Alan Franzoni (alanfranz) wrote :
Revision history for this message
Alan Franzoni (alanfranz) wrote :
Revision history for this message
Alan Franzoni (alanfranz) wrote :
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

In the bootstrap.log I see a warning that is caused by Bug #576434 that is reported to break buildout.

I have run the script and get no failures at all, either with setuptools or distribute, ~/.buildout/eggs or ./eggs

Revision history for this message
Alan Franzoni (alanfranz) wrote :

Interesting.

I had tracked the origin of that to a totally differnet source and, astonishingly, I had found out a different workaround that seemed to work!

Check this bug I opened:
https://bugs.launchpad.net/ubuntu/+source/distribute/+bug/576434
and another one that seems related:
https://bugs.launchpad.net/zc.buildout/+bug/659231

Discussion on distutils-sig:
http://mail.python.org/pipermail/distutils-sig/2010-December/017127.html

Now, I tested your workaround and:

If run bootstrap.py --distribute, everything works fine, and I can run the test after that.

If I run bootstrap.py without params, hence using legacy setuptools, I get a traceback:
alan@afra:/tmp/MyProj$ python bootstrap.py
Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1712, in main

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 1716, in <lambda>

  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 211, in run

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 446, in easy_install

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 476, in install_item

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 655, in install_eggs

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 930, in build_and_install

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 919, in run_setup

  File "/tmp/tmpzpBheX/setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 52, in run_setup
AttributeError: 'module' object has no attribute '__getstate__'
An error occurred when trying to install zc.buildout. Look above this message for any errors that were output by easy_install.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.