allowed_eggs_from_site_packages inserts site-packages in the wrong place

Bug #592524 reported by Thomas Herve
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
Fix Released
High
Gary Poster

Bug Description

When a requirement is filled by an egg in site-packages, if allowed_eggs_from_site_packages is true for that egg, then the directory for site-packages is inserts in the middle of buildout_paths list in the addsitepackages function of site.py. That means that all the eggs inserted afterwards may be ignored by any another egg in site-packages.

The following diff fixes the problem for me. I was unable to run the test suite cleanly, so I don't know if it's completely sane:

=== modified file 'src/zc/buildout/easy_install.py'
--- src/zc/buildout/easy_install.py 2010-04-29 18:11:45 +0000
+++ src/zc/buildout/easy_install.py 2010-06-11 05:19:03 +0000
@@ -881,7 +881,8 @@
                         _log_requirement(ws, req)
                         for dist in self._get_dist(req,
                                                    ws, self._always_unzip):
- ws.add(dist)
+ if dist.location not in self._site_packages:
+ ws.add(dist)
                             self._maybe_add_setuptools(ws, dist)
             if dist not in req:
                 # Oops, the "best" so far conflicts with a dependency.

Related branches

Revision history for this message
Gary Poster (gary) wrote :

Thank you. Test suite does not run cleanly because of temporary virtualenv hack for bootstrap, AFAIK.

Changed in zc.buildout:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Gary Poster (gary)
Gary Poster (gary)
Changed in zc.buildout:
status: In Progress → Fix Released
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.