On Sat, Aug 16, 2008 at 4:07 PM, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Could you guys explain how sub folders get installed and entry point
> search is performed?
> Here is a problem.
>
> I have a project that uses custom setup.py which I want to convert to
> the way paster would create it, but I get import error
>
> from myapp.lib.event import *
> ImportError: No module named lib.event
>
>
> Here is my setup.py:
> packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
> package_data = {'myapp' : ['ui/templates/*.html', 'ui/templates/content/*']},
>
> I was under the impression that find_packages will do what I need?!!
>
> How can I properly setup the subfolders, I assume I need to put
> something in __init__.py in every subfolder? But what?
>
>
> This is the final structure?!!! What should be in __init__.py files?
>
> myapp
> |-- __init__.py
> |-- __init__.pyc
> |-- lib
> | |-- __init__.py
> | |-- __init__.pyc
> | `-- event.py
>
> Ideas?
>
> Lucas
>
Any ideas how to fix this...
myapp
Traceback (most recent call last):
File "/home/lucas/tmp/harv1/bin/myapp", line 8, in <module>
load_entry_point('myapp==2.0.2dev-r91', 'console_scripts', 'myapp')()
File
"/home/lucas/tmp/harv1/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 277, in load_entry_point
File
"/home/lucas/tmp/harv1/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 2179, in load_entry_point
File
"/home/lucas/tmp/harv1/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 1912, in load
File
"/home/lucas/projects/myapp-crawler/branches/myapp-topaste/myapp/myapp/apps/myapp.py",
line 90, in <module>
from myapp.lib.event import myappEvent
ImportError: No module named lib.event
my entry point is:
entry_points="""
[console_scripts]
myapp = myapp.apps.myapp:run
and "from myapp.lib.event import * is called from :
--myapp/apps/myapp.py
And the file is located here:
--myapp/libs/event.py
Do I have to specify entry points for subfolders? They already have
empty __init__.py files?!!
What am I doing wrong here. I've been trying to fix this for a week now.
Thanks,
Lucas
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users