0

I have an issue in work with buildout. I download bootstrap.py using ,

wget http://downloads.buildout.org/2/bootstrap.py

buildout.cfg

[buildout]
parts = python
        django
develop = .
eggs = beautifulsoup
       .....

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

[django]
recipe = djangorecipe
wsgi = true
eggs = ${buildout:eggs}

when I try ./bin/buildout. I got the following error.

Upgraded:
  distribute version 0.6.35;
restarting.
Generated script '/home/tests/myproject/bin/buildout'.
Develop: '/home/tests/myproject/.'
While:
  Installing.
  Processing develop directory '/home/tests/myproject/.'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 1808, in main
    getattr(buildout, command)(args)
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 468, in install
    installed_develop_eggs = self._develop()
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/buildout.py", line 709, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/home/tests/myproject/eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/easy_install.py", line 862, in develop
    return _copyeggs(tmp3, dest, '.egg-link', undo)
  File "/home/tests//eggs/zc.buildout-2.0.1-py2.7.egg/zc/buildout/easy_install.py", line 803, in _copyeggs
    assert len(result) == 1, str(result)
AssertionError: []

Can any one help me to resolve it.

karthikr
  • 97,368
  • 26
  • 197
  • 188
Jisson
  • 3,566
  • 8
  • 38
  • 71

2 Answers2

1

You really want to run this with a virtualenv setup; on a package-based OS (such as Debian, Ubuntu, RedHat, etc) you easily run into conflicts between system-installed versions of distribute, easy_install and other 3rd-party packages, and what a buildout requires (see http://workaround.org/easy-install-debian for an explanation as to why).

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • File "./bin/buildout", line 17, in import zc.buildout.buildout File "/home/tests/fridaycloud.aws/eggs/zc.buildout-1.7.0-py2.7.egg/zc/buildout/buildout.py", line 40, in import zc.buildout.download – Jisson Feb 20 '13 at 10:47
  • File "/home/tests/fridaycloud.aws/eggs/zc.buildout-1.7.0-py2.7.egg/zc/buildout/download.py", line 20, in from zc.buildout.easy_install import realpath File "/home/tests/fridaycloud.aws/eggs/zc.buildout-1.7.0-py2.7.egg/zc/buildout/easy_install.py", line 31, in import setuptools.package_index – Jisson Feb 20 '13 at 10:48
  • File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.34-py2.7.egg/setuptools/package_index.py", line 158, in – Jisson Feb 20 '13 at 10:48
  • @Jisson: I reproduced your problem with the 2.0.x line in a virtual environment. I then switched to the 1.x branch and things worked fine. – Martijn Pieters Feb 20 '13 at 10:49
  • sys.version[:3], require('distribute')[0].version File "/home/tests/fridaycloud.aws/eggs/setuptools-0.6c12dev_r88846-py2.7.egg/pkg_resources.py", line 666, in require continue # try the next older version of project – Jisson Feb 20 '13 at 10:49
  • @Jisson: *Please* use a pastie (pastie.org) or similar to give me a traceback, or edit your question perhaps. Comments are not suitable for this. – Martijn Pieters Feb 20 '13 at 10:49
  • That traceback is incomplete. All I see is code comments on certain lines, I do *not* see an exception. – Martijn Pieters Feb 20 '13 at 10:56
  • @Jisson: I'm afraid that's a local problem, see [Easy_install and Pip doesn't work](http://stackoverflow.com/q/7110360) Try deleting `/home/tests/fridaycloud.aws/eggs/setuptools*` and `/home/tests/fridaycloud.aws/eggs/distribute*`. – Martijn Pieters Feb 20 '13 at 11:01
  • @Jisson: Moral of the story: always use a virtualenv if you can: http://workaround.org/easy-install-debian – Martijn Pieters Feb 20 '13 at 11:02
  • @ Martijn Pieters Thank you for your valuable comments,please keep in touch .Thanks a lot – Jisson Feb 20 '13 at 11:04
  • @Jisson: Just to summarize: you have two *separate* problems. The first is that `djangorecipe` only works with Buildout 1.x. This is also Buildout's fault for not being as backwards compatible as it perhaps could be. The other is that mixing Distribute versions on a package-based system often goes wrong, which can be solved using a virtual env. – Martijn Pieters Feb 20 '13 at 11:06
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24833/discussion-between-jisson-and-martijn-pieters) – Jisson Feb 20 '13 at 14:08
  • @MartijnPieters ehm, I've got some 10 buildouts locally that are 2.0 *and* that use djangorecipe. Djangorecipe 1.5 (released a month ago) fixed the incompatibility. – Reinout van Rees Feb 20 '13 at 15:38
  • @ReinoutvanRees: Interesting; I tried it in a virtual env and got a similar error to the OP. – Martijn Pieters Feb 20 '13 at 15:38
  • @ReinoutvanRees: Yay for intermittend failures! It works now. Perhaps my egg cache got in the way somewhere. – Martijn Pieters Feb 20 '13 at 15:40
  • Tnx, I see you removed the "djangorecipe doesn't work" part :-) – Reinout van Rees Feb 20 '13 at 15:44
  • @ReinoutvanRees: AH! Misread the error message, missed a timeout! The recipe never even made it to my machine. – Martijn Pieters Feb 20 '13 at 15:44
0

Problem is here not buildout, but setuptools: it was forked into distribute and setuptools, then the reunion of both, the further development. Future looks good for setuptools. But ghosts of the past are still hunting us.

Download a bootstrap.py fetching the latest setuptools

Pin zc.buildout to >= 2.2.1 and setuptools to >= 2.2 - add a versions section to buildout.cfg:

[versions]
zc.buildout = >= 2.2.1
setuptools = >= 2.2

Use with virtualenv >=1.9.1 with parameter --no-setuptools So run:

virtualenv --no-setuptools env
./env/bin/python bootstrap.py
./bin/buildout
jensens
  • 301
  • 3
  • 3