parts/buildout/site.py doesn't honor custom eggs-directory

Bug #680667 reported by RodrigoMoraes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

I define a custom eggs-directory in buildout.cfg, but it isn't honored by the generated script in parts/buildout/site.py (using zc.buildout 1.5.2) when using "relative-paths = true". For example:

    [buildout]
    relative-paths = true
    # Buildout bug: it doesn't honor custom egg dir this in parts/buildout/site.py
    # Until it is fixed we need to use the standard eggs dir.
    eggs-directory = var/eggs

This causes a "ImportError: No module named pkg_resources" because site.py will add the wrong egg dir to sys.path and pkg_resources won't be available. Starting at site.py line 255:

    def addsitepackages(known_paths):
        """Add site packages, as determined by zc.buildout.

        See original_addsitepackages, below, for the original version."""
        join = os.path.join
        base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
        base = os.path.dirname(base)
        base = os.path.dirname(base)
        base = os.path.dirname(base)
        setuptools_path = join(base, 'eggs/distribute-0.6.14-py2.6.egg')
        sys.path.append(setuptools_path)
        ]

See? eggs directory is wrong and not honoring the one defined in buildout.cfg.

Revision history for this message
RodrigoMoraes (rodrigo-moraes) wrote :
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.