[Distutils] Removing the hack from setup.py - Setup.py as a Class, not a Procedure

Jean-Paul Calderone exarkun at divmod.com
Wed Jul 22 15:29:29 CEST 2009


On Tue, 21 Jul 2009 22:20:15 -0500, Jeff Rush <jeff at taupro.com> wrote:
>David Lyon wrote:
>> On Tue, 21 Jul 2009 14:12:48 -0400, "P.J. Eby" <pje at telecommunity.com>
>> wrote:
>>> The concept of "package data" is data in the same directory as the
>>> package's Python code.  Using it to install libraries is a bit of a
>>> hack in the first place.
>>
>> Too right it's a hack - haha. I'm glad that I'm not the only one who's
>> noticed.
>
>You're misreading him - the hack is using an attribute of
>"package_data", which is intended for describing "data files residing
>within a package directory", in a way in which it was not intended to
>describe data _outside_ a package directory.  That's a definition of a hack.
>
>If an egg wants to splatter data files outside the Python package area,
>other than scripts in /usr/local/bin/, I'd consider that very bad
>behavior.

To clarify, I want to collect data files from outside of the Python package
area in the build environment, and place them *into* the Python package
area in the egg.  I don't want to "splatter" them outside that area when
the package is installed.

Jean-Paul


More information about the Distutils-SIG mailing list