-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify how to use the ext namespace and RendererEngine #12
Comments
Hey, thanks for your interest in my little project! Yeah the Your current implementation is using the MakoRenderer - so changing the contents of that file to JinjaRenderer might be the solution. Or it might be a bug in setuptools; when installing in editable mode I've been working on an 0.8 release I'll push soon, there should be many fixes with the error handling, but the extension importer has not been touched. I'm sorry about the lack of documentation. You're probably the only other person to have written an extension, so I'm curious to hear your thoughts on what could use some work. Thanks, |
I found and pushed my updated mako renderer code that uses the "new" RenderEngine interface - which isn't nailed down and would really appreciate some thoughts on how it could work better. The biggest change is the class must not overload |
I forgot to
(Just to fully disclose, I'm not a very good programmer, so if I suggest or ask something ridiculous, please gently correct me. I am a fairly good editor and writer if you need help on the docs, though.) |
Good news! It looks as though I never fully understood "modern" namespace packages. As I now understand it, since Python 3.3, any directory without an init.py file is treated as a namespace package, implicitly. This means my current method of defining I don't have to do anything, and as long as other projects define This means you don't need And yes, this even works with The only thing to worry about with this scheme is some package adding It's way too late right now to commit any code with confidence, but I'll probably have some time tomorrow to finally push my changes and do a version bump. |
I'm trying to build a growler-jinja extension by copying growler-jade and
growler.renderer.RendererEngine
. However, I'm getting an import error running from the REPL (after apip install -e .
):I don't fully understand setuptools namespaces, so this is partly my own ignorance.
I also see that the api for subclassing
RenderEngine
has changed subtly. Does the growler-jade source reflect the current api?After using node's koa framework, I'm excited to try to port my Flask app to Growler.
ubuntu 16
python 3.5.2
virtualenv 15.0.2
setuptools 26.0.0
growler 0.7.5
The text was updated successfully, but these errors were encountered: