On Mar 29, 2012 6:06 AM, "Roberto De Ioris" <[email protected]> wrote: > > > > as alluded by the subject, aliasing a package appears to work, but the > > __path__ attribute is missing and thus relative (and absolute) imports > > fail with: > > > > Traceback (most recent call last): > > File "/path/to/package/types/type-salesforce-cases//__init__.py", > > line 3, in <module> > > from .application.instance import entry_point > > ValueError: Attempted relative import in non-package > > > > ... and ... > > > > > > I should have missed something :) > > Are you importing with module=module mapping or with module=file ? > > pymodule-alias = foo=/var/bar > > should set the __path__ to /var/bar as here: > > http://projects.unbit.it/uwsgi/browser/plugins/python/python_plugin.c#L411 > > while > > pymodule-alias = foo=bar > > would be a pointer to 'bar' and so you should see its path. > > Can you paste some 'simple' example ? Maybe i have not got the point
I'm doing the first, but no __path__ exists at all :-( ... Yeah this all blew up at the last second before bed, I gathered stuff up and fired it off :-) It's buried in the output, but ill make a more specific example in about an hour -- I was aliasing a directory/package, then importing it: […] pymodule-alias = Self=/path/to/package-with-dashes/ module = Self […] -- C Anthony
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
