[Distutils] zc.buildout fails to use system-installed dep?

Alan Franzoni mailing at franzoni.eu
Fri Dec 3 18:28:47 CET 2010


Hello,
there's a problem with zc.buildout that I can reproduce very easily on
Ubuntu 10.10 (64 bit)

it seems that zc.buildout does not download the dependency from pypi
if the very same version is already available in the host system, but
then for some reason does not add it to sys.path and/or is unable to
use it for some reason; zope.testrunner hence fails on importing
zope.interface

python-zope.interface is installed at version 3.6.1, and
zope.testrunner seems to use that very same dependency.

Any workaround? I'll open an issue on launchpad in the weekend.

Do this in order to reproduce the problem:

# 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 --distribute && bin/buildout -vvv
bin/test
#end

output from buildout run:

alan at 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
Building a Distribute egg in /tmp/tmphpzBsD
/tmp/tmphpzBsD/distribute-0.6.14-py2.6.egg
install_dir /tmp/tmphpzBsD
Creating directory '/tmp/MyProj/bin'.
Creating directory '/tmp/MyProj/parts'.
Creating directory '/tmp/MyProj/eggs'.
Creating directory '/tmp/MyProj/develop-eggs'.
Generated script '/tmp/MyProj/bin/buildout'.
Upgraded:
  distribute version 0.6.14;
restarting.
Develop: '/tmp/MyProj/myproj'
install_dir /tmp/MyProj/develop-eggs/tmpoKKOZAbuild
Getting distribution for 'zc.recipe.testrunner'.
install_dir /tmp/MyProj/eggs/tmpQvIfIg
zip_safe flag not set; analyzing archive contents...
Got zc.recipe.testrunner 1.4.0.
Getting distribution for 'z3c.recipe.scripts>=1.0.0'.
install_dir /tmp/MyProj/eggs/tmpQPz2RH
Got z3c.recipe.scripts 1.0.1.
Getting distribution for 'zope.testrunner'.
install_dir /tmp/MyProj/eggs/tmpGvi6JB
package init file 'src/zope/testrunner/testrunner-ex/__init__.py' not
found (or not a regular file)
Creating missing __init__.py for zope.testrunner.testrunner-ex
Got zope.testrunner 4.0.0.
Getting distribution for 'zc.recipe.egg>=1.3.0'.
install_dir /tmp/MyProj/eggs/tmp_pJ4gb
Got zc.recipe.egg 1.3.2.
Getting distribution for 'zope.exceptions'.
install_dir /tmp/MyProj/eggs/tmpxRSjc1
Got zope.exceptions 3.6.1.
Installing test.
Generated script '/tmp/MyProj/bin/test'.
alan at 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





-- 
Alan Franzoni
--
contact me at public@[mysurname].eu


More information about the Distutils-SIG mailing list