WSGI-script produces a different path than the management wrapper
Bug #370420 reported by
Horst Gutmann
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
Related branches
lp:~jezdez/djangorecipe/better-protocol-scripts
- Jeroen Vloothuis: Pending (urgent) requested
- Diff: None lines
Changed in djangorecipe: | |
status: | New → Fix Committed |
Changed in djangorecipe: | |
status: | Fix Committed → Fix Released |
Changed in djangorecipe: | |
status: | Fix Released → New |
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 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.