--
You received this message because you are subscribed to the Google Groups "PyKE" group.
To post to this group, send email to py...@googlegroups.com.
To unsubscribe from this group, send email to pyke+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyke?hl=en.
On 05/16/2011 02:18 AM, Bill Janssen wrote:
> It would really be great if you could tell pyke where compiled_krb
> should go.
+1 for this option. We're using PyKE with Django and I would love to put
the compiled_krb into /tmp instead of the working directory. The problem
with the latter is that the WSGI-process does not have write access to
the application directory and from time to time we get permission errors
as the rules change.
I know I could fix it with umask or maybe adding the compiled_krb into
our GIT, but that doesn't seem like a pretty solution.
Cheers,
Lauri Kainulainen
On 05/16/2011 05:23 PM, Bruce Frederiksen wrote:
> I guess you're also generating rules dynamically?
Not really. The problem just arises when I've done some changes on the
development server and updated compiled_krb as my normal user (e.g. with
Django this happens if you use the Django shell). Then if I change
something locally, updating and refreshing the server will cause the
perms error as www-data tries writing to the compiled_krb folder.
> Pyke was designed thinking that the rules would be relatively static
> (like the source code). And an attempt was made to allow applications
> to be written that could be distributed through pypi or whatever; which
> means that they would be installed into different directories on
> different systems.
Ok. I see.
> Then tell Python where "pyke_rules" is by putting the directory
> containing pyke_rules on your Python path (e.g., add a .pth file to your
> site-packages directory). This can be whatever directory you like, for
> example: /tmp/myapp_rules. I think that if you don't have a prefix on
> the target (not "foo.pyke_rules"), you'll have to create a
> /tmp/myapp_rules/pyke_rules directory with an __init__.py in it so that
> Pyke will find it. If you said "foo.pyke_rules", then the "foo"
> directory would have to exist, and Pyke would create the pyke_rules
> directory under it.
I poked around the code enough to find that option. Didn't just occur to
me to use it with .pth files. I'll try that at some point.
Thanks for the pointers!
Lauri