Buildout -- Software for automating application assembly

Develop broken for projects using modules in the distribution root

Reported by Ross Patterson on 2007-10-12
2
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

Bug Description

Projects using modules in the project distribution root in their setup.py fail when used in the buildout develop option.

This can be reproduced, for example, by using ez_setup as described in:

http://peak.telecommunity.com/DevCenter/setuptools#id23

To reproduce make an empty directory and make an empty module, bar.py in the directory:

  """Empty bar module"""

Download bootstrap.py into it:

http://peak.telecommunity.com/dist/ez_setup.pyhttp://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py

Then make a setup.py that imports foo::

    #!/usr/bin/env python
    import bar

    from setuptools import setup

    setup(name='foo')

Make an buildout.cfg that passes the project to the develop option::

    [buildout]
    develop = .

Then bootstrap buildout::

    $ python bootstrap.py -v

Finally run buildout. Note that an error occurs importing ez_setup::

    $ bin/buildout -v
    Installing 'zc.buildout', 'setuptools'.
    We have the best distribution that satisfies 'zc.buildout'.
    Picked: zc.buildout = 1.0.0b30
    We have the best distribution that satisfies 'setuptools'.
    Picked: setuptools = 0.6c7
    Develop: '/tmp/foo/.'
    Traceback (most recent call last):
      File "/tmp/tmpsDYTIA", line 10, in ?
        execfile('/tmp/foo/./setup.py')
      File "/tmp/foo/./setup.py", line 2, in ?
        import bar
    ImportError: No module named bar
    While:
      Installing.
      Processing develop directory '/tmp/foo/.'.

    An internal error occured due to a bug in either zc.buildout or in a
    recipe being used:

    AssertionError:

Ross Patterson (rossp) wrote :

As reported by Tim Knapp, the problem is more general than ez_setup.py. I updated the summary and description with this new information.

description: updated
Ross Patterson (rossp) wrote :

Committed a fix in r81246

Changed in zc.buildout:
status: New → Fix Committed

Much thanks!

On Oct 30, 2007, at 6:49 PM, Ross Patterson wrote:

> Committed a fix in r81246
>
> ** Changed in: zc.buildout
> Status: New => Fix Committed
>
> --
> Develop broken for projects using modules in the distribution root
> https://bugs.launchpad.net/bugs/151820
> You received this bug notification because you are the bug contact for
> Buildout.

--
Jim Fulton
Zope Corporation

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

Other bug subscribers