Git Product home page Git Product logo

Comments (6)

rvanlaar avatar rvanlaar commented on July 19, 2024

(by maxim-razin)
The same problem on Ubuntu 10.04.

buildout finds one of the needed modules under the generic Python library path '/usr/lib/pymodules/python2.6', and inserts it before the correct django path 'PROJECTDIR/parts/django'.

Looks like a bug in buildout (I would prefer if buildout inserted extra-paths before eggs).

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by roland-micite)
Thanks for reporting this.

Does this issue still exist with the new 0.99 release?
Djangorecipe now has django as a dependency and isn't installed in parts anymore.

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by myersjj)
After doing the changes to use 0.99, I got this error. Shouldn't it
upgrade in this case?

While:
Installing.
Getting section django.
Initializing section django.
Installing recipe djangorecipe.
Error: There is a version conflict.
We already have: Django 1.2.4

After I manually uninstalled using pip, the build completed OK.
Here is the myproject.wsgi it generated (the offending line is still
there)...

#!"C:\python26\python.exe"

import sys
sys.path[0:0] = [

'c:\home\dhat\webapps\dd_django\myproject\eggs\dojango-0.5.1-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\xlrd-0.7.1-py2.6-win32.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\xlwt-0.7.2-py2.6-win32.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\titlecase-0.4-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\whoosh-1.8.4-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\djangorecipe-0.99-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\django-1.2.5-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\zc.recipe.egg-1.3.2-py2.6.egg',

'c:\home\dhat\webapps\dd_django\myproject\eggs\zc.buildout-1.5.2-py2.6.egg',
'c:\python26\lib\site-packages',
'c:\home\dhat\webapps\dd_django\myproject\parts\django',
'c:\home\dhat\webapps\dd_django\myproject',
'c:\home\dhat\webapps\dd_django',
'c:\home\dhat\webapps\dd_django\myproject\portal',
'c:\home\dhat\webapps\dd_django\myproject\djangobb_forum',
'c:\home\dhat\webapps\dd_django\myproject\faq',

'c:\home\dhat\webapps\dd_django\myproject\parts\django-haystack',
]

import djangorecipe.wsgi

application = djangorecipe.wsgi.main('myproject.settings', logfile='')

On 6/7/2011 7:41 AM, roland wrote:

Thanks for reporting this.

Does this issue still exist with the new 0.99 release?
Djangorecipe now has django as a dependency and isn't installed in parts anymore.

** Changed in: djangorecipe
Status: New => In Progress

Jim Myers

The TBone way, perfection is sacrificed for energy and impact.

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by roland-micite)
Well, Django is now installed as an egg, so that means that it comes before your system django.

The other thing, please don't install site-packages that have different versions then you need for your buildout.
However, you can exclude site-packges from your buildout.
Please read http://pypi.python.org/pypi/zc.buildout/1.5.2#working-with-a-system-python for more information.

from djangorecipe.

rvanlaar avatar rvanlaar commented on July 19, 2024

(by simeon-movchan)
I have Django 1.3 in system python site-packages and I tried several configuration options.

First config works fine:

[buildout]
parts =
django
eggs =
docutils
feedparser
ipython
pil
south
include-site-packages = false
versions = versions

[versions]
django = 1.2.5

[django]
recipe = djangorecipe
project = fooproject
settings = development
eggs = ${buildout:eggs}

It produces the following sys.path in django command script:

sys.path[0:0] = [
'c:\workspace\buildtest\eggs\docutils-0.8-py2.7.egg',
'c:\workspace\buildtest\eggs\feedparser-5.0.1-py2.7.egg',
'c:\workspace\buildtest\eggs\ipython-0.10.2-py2.7.egg',
'c:\workspace\buildtest\eggs\pil-1.1.7-py2.7-win32.egg',
'c:\workspace\buildtest\eggs\south-0.7.3-py2.7.egg',
'c:\workspace\buildtest\eggs\djangorecipe-0.99-py2.7.egg',
'c:\workspace\buildtest\eggs\django-1.2.5-py2.7.egg',
'c:\workspace\buildtest\eggs\zc.recipe.egg-1.3.2-py2.7.egg',
'c:\workspace\buildtest\eggs\zc.buildout-1.5.2-py2.7.egg',
'c:\workspace\buildtest\eggs\setuptools-0.6c12dev_r88846-py2.7.egg',
'c:\workspace\buildtest\parts\django',
'c:\workspace\buildtest',
]

Everything is good, except 'c:\workspace\buildtest\parts\django'. Django lives in eggs dir, not in parts. Although it does not matter.

However, if I want to use several dependencies from site-packages by specifying them with allowed-eggs-from-site-packages, I get a version conflict:

While:
Installing.
Getting section django.
Initializing section django.
Installing recipe djangorecipe.
Error: There is a version conflict.
We already have: Django 1.3

Second config that causes version conflict:

[buildout]
parts =
django
eggs =
docutils
feedparser
ipython
pil
south
allowed-eggs-from-site-packages = pil
versions = versions

[versions]
django = 1.2.5

[django]
recipe = djangorecipe
project = fooproject
settings = development
eggs = ${buildout:eggs}

from djangorecipe.

reinout avatar reinout commented on July 19, 2024

Closing it; I guess the latest buildouts work fine regarding paths.

from djangorecipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.