grokproject generates non-working bootstrap.py

Bug #286288 reported by Thomas Lotze
4
Affects Status Importance Assigned to Milestone
grok
Fix Released
Undecided
Jan Wijbrand Kolman
1.0
Fix Released
Undecided
Jan Wijbrand Kolman

Bug Description

grokproject's project template contains a modified bootstrap.py which hasn't received merges from the trunk. Even though grokproject manages to run buildout successfully after it first creates the project, later runs of bootstrap.py fail:

$ /opt/Python-2.5.1/bin/python bootstrap.py
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
Develop: '/home/thomas/tmp/foo/.'
Traceback (most recent call last):
  File "/tmp/tmpy5k5h5", line 5, in <module>
    import os, setuptools
ImportError: No module named setuptools
While:
  Installing.
  Processing develop directory '/home/thomas/tmp/foo/.'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/tmp/tmp6JNutY/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 1477, in main
  File "/tmp/tmp6JNutY/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 324, in install
  File "/tmp/tmp6JNutY/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 556, in _develop
  File "/tmp/tmp6JNutY/zc.buildout-1.1.1-py2.5.egg/zc/buildout/easy_install.py", line 866, in develop
AssertionError

todd (todd-infrae)
Changed in grok:
assignee: nobody → janwijbrand
milestone: none → 1.0
Revision history for this message
Jan Wijbrand Kolman (janwijbrand) wrote :

I cannot reproduce this issue with projects build with grokproject-0.9. Closing.

Changed in grok:
status: New → Invalid
Revision history for this message
Thomas Lotze (tlotze) wrote :

Reopened. I can still reproduce the bug by running bootstrap.py using a different Python installation. It is true, however, that there's no failure when running it with the same Python used by grokproject when creating the environment. I think bootstrap.py should be able to succeed with any Python installation (assuming the Python version is supported).

Changed in grok:
status: Invalid → New
Revision history for this message
Jan Wijbrand Kolman (janwijbrand) wrote :

Thomas, can you be even more specific? I tried just running bootstrap.py (from grokproject-0.9) using python from two different virtualenvs, and in both runs the buildout succeeds... Are you sure you're using the bootstrap.py as created by grokproject-0.9?

I tried to identify the differences between the most recently tagged bootstrap.py (from zc.buildout) and the one grokproject generates, and apart from two grok-specific additions (fixing the logging and calling the eggbasket part) I do not see a difference.

Changed in grok:
status: New → Incomplete
Revision history for this message
Thomas Lotze (tlotze) wrote :

I'm using a self-compiled Python 2.5.1 and a virtualenv created from it. In the virtualenv, I've installed grokproject 0.9 (using easy_install, which pulled it from PyPI). I then created a fresh Grok project which went fine. Using the Python executable from the virtualenv, I can run bootstrap.py fine. Using the original Python executable from whose installation I created the virtualenv, I can't. I'm also sure that I used the bootstrap.py put in the fresh project directory by grokproject in both cases; see the transcript below.

Doing something similar without grokproject works, though: If I create an empty directory with a minimal buildout.cfg, copy the latest tagged bootstrap.py to it and run the two Pythons on it in the same order, everything works as expected.

thomas@krusty:~/tmp$ grokproject foo
Enter user (Name of an initial administrator user): admin
Enter passwd (Password for the initial administrator user):
Downloading info about versions...
Creating directory ./foo
Downloading zc.buildout...
Invoking zc.buildout...
Develop: '/home/thomas/tmp/foo/.'
Installing eggbasket.

thomas@krusty:~/tmp$ cd foo/

thomas@krusty:~/tmp/foo$ python bootstrap.py
Develop: '/home/thomas/tmp/foo/.'
Installing 'z3c.recipe.eggbasket'.
We have the distribution that satisfies 'z3c.recipe.eggbasket==0.4.0'.
Getting required 'zc.recipe.egg==1.1.0b1'
We have the distribution that satisfies 'zc.recipe.egg==1.1.0b1'.
Updating eggbasket.
Now you can run 'bin/buildout'

thomas@krusty:~/tmp/foo$ /opt/Python-2.5/bin/python bootstrap.py
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
Generated script '/home/thomas/tmp/foo/bin/buildout'.
Develop: '/home/thomas/tmp/foo/.'
Traceback (most recent call last):
  File "/tmp/tmp07z1jx", line 5, in <module>
    import os, setuptools
ImportError: No module named setuptools
While:
  Installing.
  Processing develop directory '/home/thomas/tmp/foo/.'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/tmp/tmplSbcEb/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 1477, in main
  File "/tmp/tmplSbcEb/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 324, in install
  File "/tmp/tmplSbcEb/zc.buildout-1.1.1-py2.5.egg/zc/buildout/buildout.py", line 556, in _develop
  File "/tmp/tmplSbcEb/zc.buildout-1.1.1-py2.5.egg/zc/buildout/easy_install.py", line 866, in develop
AssertionError

Revision history for this message
Jan Wijbrand Kolman (janwijbrand) wrote :

I tried to reproduce this scenario with the current grokproject version. Thomas, can you confirm that this issue does not occur anymore with the most recent grokproject version? (I tested it with grokproject-1.0a2).

Revision history for this message
Jan Wijbrand Kolman (janwijbrand) wrote :

Closing this issue as it seems to be resolved in the newer grokproject release. If not, we can re-open it again.

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.