pkg_resources required by PackageLoader class #143

mchesnut opened this Issue Jul 31, 2012 · 5 comments

2 participants


In, in the PackageLoader class, the constructor does this:

    from pkg_resources import DefaultProvider, ResourceManager, \

pkg_resources is supplied by setuptools/distribute, but I didn't think these were supposed to be run-time dependencies of Jinja2 (I know they're required at build time, and that's well-documented).

Is this an error, bug, documentation problem, misunderstanding on my part, or something else?



I'm still having issues with this--is it a bug that I should expect to be fixed, or designed functionality that I need to work around? Any input would be greatly appreciated...


Are you trying to use the PackageLoader class?


Yes, that's the issue. If you use PackageLoader, it requires distribute (setuptools) at run time due to the import line shown above. I'm wondering if this is intentional (setuptools/distribute don't seem like they should ever be runtime dependencies in most circumstances).


This is critical to provide the functionality offered by PackageLoader, otherwise it wouldn't be there. Would you like to make this requirement clearer in the documentation?


Okay thanks for the clarification. I've opened a pull request (#168) to add a mention of this to the documentation.

Really I think we should also update to make distribute a requires, but I'm not sure if there's a way to do "or" in there (distribute or setuptools would be the requirement).

@mchesnut mchesnut closed this Dec 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment