[Distutils] distlib and data files => resources ?

Chris McDonough chrism at plope.com
Sun Nov 18 23:15:40 CET 2012


On 11/18/2012 05:08 PM, Vinay Sajip wrote:
> Tarek Ziadé <tarek <at> ziade.org> writes:
>
>> Having a indirection like distutils2's resources allows the data files
>> to live alongside the code
>> in development and to be installed wherever that's desired by the
>> distro, without breaking
>> the code as long as it uses the indirection function to find back the file.
>>
>> Since the indirection is provided by a file that can be browsed in the
>> metadata directory,
>> it means anyone can get the file location by using the API we provided.
>
> Yes, but it seems like you're assuming everything's always installed in a
> conventional way and not, say, deployed in a .zip. I'm not disputing what you
> said - get_file_path and get_resource_path are still there in distlib - but I'm
> not sure that there's *never* a case for data located in packages.

Requiring that developers build an 
alternate-structure-of-files-that-arent-Python-files-just-because-they-aren't-Python-files 
outside the package structure seems like a terrible idea.

- C



More information about the Distutils-SIG mailing list