[Distutils] Bundling pkg_resources

cool-RR cool-rr at cool-rr.com
Mon Nov 30 19:00:25 CET 2009


On Mon, Nov 30, 2009 at 7:57 PM, P.J. Eby <pje at telecommunity.com> wrote:

> At 02:09 PM 11/30/2009 +0000, Ram Rachum wrote:
>
>> I've asked before about bundling Distribute. But now I ask, is it possible
>> to
>> pull out the `pkg_resources` module from the Distribute folder and bundle
>> only
>> that with my project?
>>
>
> If your project is a standalone application with a completely isolated
> sys.path, then yes, you can bundle it.  If your project is a library or
> shares sys.path directories with other libraries or applications, then no,
> *do not bundle it*.
>
> (This is true even for the original pkg_resources, but it's doubly true for
> Distribute's pkg_resources, as installing it may break a setuptools-based
> installation's ability to upgrade setuptools.)
>

What I was thinking is to put it in its own package, and then import it like
`from my_package import pkg_resources`.

Would that still be problematic?

Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20091130/bd1cf20c/attachment-0001.htm>


More information about the Distutils-SIG mailing list