WSGI-script produces a different path than the management wrapper

Bug #370420 reported by Horst Gutmann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Django Recipe
Fix Released
Undecided
Jannis Leidel

Bug Description

I ran into a small problem where the order of the sys.path components was relevant and I noticed that the generated django.wsgi script appends the local components while bin/django prepends them. IMO local path components should be prepended in both cases.

Tested with zc.buildout 1.2.1

Tags: fcgi syspath wsgi
Revision history for this message
Horst Gutmann (zerok) wrote :
description: updated
Revision history for this message
Jacob Kaplan-Moss (jacobian) wrote :

This is more than just a consistency thing. Because the WSGI script uses sys.path.extend it means that buildout-installed dependencies get overridden by system-wide packages, and this makes djangorecipe-based deployments hard or impossible in shared hosting situations.

As an example, my particular situation is a host with lxml 1.3 installed but a deployment that needs lxml 2.2. The 2.2 egg is installed just fine, but because the WSGI script extends the path the systemwide 1.3 egg is always loaded instead.

Changed in djangorecipe:
status: New → Fix Committed
Changed in djangorecipe:
status: Fix Committed → Fix Released
Revision history for this message
Jannis Leidel (jezdez) wrote :

Jacob is totally right, the global site-packages will override the packages installed by buildout. I've fixed that in my branch by using buildout's own mechanism to create script files so it's guaranteed to be the same path as in the manage script. This is a critical bug, IMO.

Jannis Leidel (jezdez)
Changed in djangorecipe:
status: Fix Released → New
Jannis Leidel (jezdez)
Changed in djangorecipe:
assignee: nobody → Jannis Leidel (jezdez)
status: New → Confirmed
Changed in djangorecipe:
status: Confirmed → 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.