[zc.buildout] use of pkg_resources

I'm intrigued ... Why the scripts buildout produces don't use pkg_resources. They all add each egg to sys.path manually and import script entry points manually. It would seem more consistent to use pkg_resources.working_set.find_plugins() and pkg_resources.working_set.run_script() I can imagine there might be a good reason, such as making absolutely sure the correct egg is at the top of sys.path. This is another example of the TIMTOWTDI malaise that is rife with anything to do with setuptools. Thanks, Stephen. --- Stephen Pascoe +44 (0)1235 445980 British Atmospheric Data Centre Rutherford Appleton Laboratory -- Scanned by iCritical for STFC.

On Oct 21, 2008, at 12:21 PM, Pascoe, S (Stephen) wrote:
I'm intrigued ...
Why the scripts buildout produces don't use pkg_resources. They all add each egg to sys.path manually and import script entry points manually. It would seem more consistent to use pkg_resources.working_set.find_plugins() and pkg_resources.working_set.run_script()
I can imagine there might be a good reason, such as making absolutely sure the correct egg is at the top of sys.path.
Yes, among other reasons, such as: - Not using system Python, - Not requiring a special python environment to be set when not using a system Python, - Allowing different scripts to use different package versions, as needed by the script.
This is another example of the TIMTOWTDI malaise that is rife with anything to do with setuptools.
The "it" is different in the case of buildout. Buildout is solving a somewhat different problem than easy_install. Jim -- Jim Fulton Zope Corporation
participants (2)
-
Jim Fulton
-
Pascoe, S (Stephen)