The bug tracker for setuptools 0.7 or higher is on BitBucket



Title development egg: recusion to deep when re-running develop
Priority bug Status resolved
Superseder Nosy List htgoebel,, pje, srid
Assigned To Keywords needpatch

Created on 2008-09-03.14:54:49 by htgoebel, last changed 2009-10-19.19:33:07 by pje.

File name Uploaded Type Edit Remove
PasteScript-1.7.3.log.txt srid, 2009-06-17.23:17:43 text/plain
msg424 (view) Author: pje Date: 2009-10-19.19:33:07
setuptools 0.6c10 is released with a fix for this issue.
msg365 (view) Author: pje Date: 2009-10-10.19:04:45
The recursion in the log attached to this case here is occurring during entry
point resolution; specifically, it appears to be trying to use an
egg_info.writers entry point that depends on PasteDeploy while running the
egg_info command on PasteScript.  This causes it to try to install PasteDeploy
(because it's an install-time requirement of PasteScript as a whole), but since
the entry point is still present, the attempt to run the egg_info command on
PasteDeploy tries to make it install PasteDeploy a second time.

Two possible ways to fix this would include making PasteDeploy a setup-time
requirement of PasteScript, or making it not a requirement at all.

To fix the problem in future versions of setuptools, I'll ensure that the
pkg_resources state is sandboxed between the parent and child builds, and that a
child build's working set includes the setup directory.  (Currently, the
directory is added to sys.path, but not to the working set.)  This should let
child builds be considered a resolution to the parent's requirements, without
starting a recursive rebuild of the child.  Then, as long as the child has an
.egg-info file or directory when the build starts, the problem won't happen. 
(One could still have a problem on an svn checkout in that case, though; not a
lot I can do about that one, except document that you should use setup_requires.)

For now, though, try putting PasteDeploy in setup_requires as well as
install_requires, or alternatively dropping it from install_requires.  I will
also soon have a patch for the original problem in setuptools trunk, which I'd
like for you to test (without the workaround) to make sure I've fixed it
correctly.  Thanks!
msg363 (view) Author: Date: 2009-10-10.15:51:04
There isn't a circular requirement, but I have come upon different recursion 
problems (they sometimes manifest themselves different ways, like a Bus Error).  
They seem to be related to PasteScript's entry points:

    paster_plugins = setuptools.dist:assert_string_list

    paster_plugins.txt = setuptools.command.egg_info:write_arg

And then some issue about what order things are installed it, because the 
presence of the argument seems to sometimes cause an installation or... 
something.  It's been confusing, because the errors don't seem directly related 
to the source of the problem.
msg359 (view) Author: pje Date: 2009-10-10.06:00:28
The PasteScript problem appears unrelated; judging from the attached log, it
looks like it has a build-time dependency on PasteDeploy, which in turn has a
build-time dependency on PasteScript, which then results in an infinite
recursion.  This is different from the original problem reported here, and
should be referred to Ian, as it does not appear to be a setuptools bug.
msg305 (view) Author: srid Date: 2009-06-17.23:18:12
Adding ianb who is the author of PasteScript.
msg304 (view) Author: srid Date: 2009-06-17.23:17:43
Also happens when you run "easy_install PasteScript". Log file attached.
msg165 (view) Author: pje Date: 2008-09-11.15:37:55
The installation target(s) for the develop command should not be the current
directory.  There should probably be a check for this.  (Maybe for install, too.)
msg153 (view) Author: htgoebel Date: 2008-09-03.14:54:49
I'm installing a development egg like this::
  PYTHONPATH=.:$PYTHONPATH python develop --install-dir . --script-dir .

Now when re-running the command above, it will fail::
line 1072, in safe_name
  File "/usr/lib/python2.5/", line 150, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.5/", line 230, in _compile
    p = _cache.get(cachekey)
  RuntimeError: maximum recursion depth exceeded in cmp

This seams to be a problem with *.egg-link. If I add these lines to teh fron tom
my, re-running is fine:

    import glob, os
    for fn in glob.glob('*.egg-link'):
Date User Action Args
2009-10-19 19:33:07pjesetstatus: in-progress -> resolved
messages: + msg424
2009-10-10 21:23:22pjesetstatus: chatting -> in-progress
2009-10-10 19:04:45pjesetmessages: + msg365
2009-10-10 15:51:04ianb@colorstudy.comsetmessages: + msg363
2009-10-10 06:00:28pjesetmessages: + msg359
2009-06-17 23:18:12sridsetnosy: +
messages: + msg305
2009-06-17 23:17:44sridsetfiles: + PasteScript-1.7.3.log.txt
nosy: + srid
messages: + msg304
2008-09-11 15:37:55pjesetstatus: unread -> chatting
nosy: + pje
messages: + msg165
keyword: + needpatch
2008-09-03 14:54:49htgoebelcreate