[Distutils] how can I egt the packages and modules in a distribution?

P.J. Eby pje at telecommunity.com
Fri Aug 20 18:07:43 CEST 2010


At 03:19 PM 8/20/2010 +0100, Chris Withers wrote:
>P.J. Eby wrote:
>>>Which template do I get if I do:
>>>
>>>pkg_resources.resource_string(tuple(pkg_resources.parse_requirements('XA'))[0],'templates/master') 
>>>
>>>
>>>...in the context of pip or another flat-structure install?
>>You get whatever was installed last.
>
>Is pkg_resources.resource_string(<requirement>,..) *ever* useful or sane then?

Good point.  The installation of data in that way was for 
backward-compatibility with packages using install_data; but such 
packages by definition are unlikely to be using the resource APIs in 
the first place.

>It doesn't sound like it, in which case, could it be deprecated and 
>removed please?

I'll give it some serious thought.


>>(Alternatively, they can put their stuff under the project's 
>>egg-info directory, the way EggTranslations does.)
>
>What's EggTranslations and where can I see its code?

http://pypi.python.org/pypi/EggTranslations



More information about the Distutils-SIG mailing list