[Distutils] [buildout] import develop eggs
stefan tjarks
stefan at tjarks.de
Mon Jun 16 06:59:28 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm not sure where to post this, so if it's the wrong list please point
me to the right one.
I started using zc.buildout with django and are using djangorecipe[1].
After running buildout and trying to start django it fails trying to
import my development module. Here is what I did in more detail.
My folder structure:
root/
bootstrap.py
buildout.cfg
src/
myapp/
setup.py
src/
...
The buildout.cfg:
[buildout]
parts = django
eggs = psycopg2
develop = src/myapp
[django]
recipe = djangorecipe
version = trunk
django_location = ${buildout:directory}/django_src
settings = development
eggs = ${buildout:eggs}
project = instance
Running bootstrap.py and bin/buildout works fine and gives me a
develop-eggs directory with an .egg-link file as well as a bin/django file.
After inserting 'myapp' into djangos settings file I tried to start
django with 'bin/django runserver' and it failed with
ImportError: No module named myapp
The bin/django file is basically a wrapper, that sets the python path to
all eggs and the project root directory.
#!/home/dev/python2.5/bin/python
import sys
sys.path[0:0] = [
'/home/dev/eggs/psycopg2-2.0.7-py2.5-linux-ppc.egg',
'/home/dev/eggs/djangorecipe-0.8-py2.5.egg',
'/home/dev/eggs/zc.recipe.egg-1.0.0-py2.5.egg',
'/home/dev/eggs/zc.buildout-1.0.6-py2.5.egg',
'/home/dev/eggs/setuptools-0.6c8-py2.5.egg',
'/home/dev/parts/django',
'/home/dev',
]
import djangorecipe.manage
if __name__ == '__main__':
djangorecipe.manage.main('instance.development')
I don't see what I have missed. I do see that the develop-eggs directory
is nowhere mentioned in the generated files, but thought that setuptools
would take care of that and made the dev eggs importable.
Regards
- -stj
[1] https://launchpad.net/djangorecipe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIVfMvwRdcaudH4ncRAvULAJsEzXnSpcX2MkelhQ/o+WRAGAAd/gCgmJ7e
/r3qUz9V5VbYIhkK4jJM4K4=
=wtjq
-----END PGP SIGNATURE-----
More information about the Distutils-SIG
mailing list