Distutils extension proposal (was: Re: Distutils question)

Laszlo Zsolt Nagy gandalf at geochemsource.com
Thu Sep 8 11:54:00 EDT 2005


Peter Hansen wrote:

>>How how can I install my .mo files from a distutil script into its 
>>default location?
>>
>>sys.prefix + os.sep + 'share' + os.sep + 'locale'
>>    
>>
>
>I can't answer the first question, but the latter should be written this 
>way instead
>
>    os.path.join(sys.prefix, 'share', 'locale')
>
>for greater portability and maintainability.
>  
>
Of course. :-)

I know that Peter is a big Python guru, and he could not answer the 
question. I also read the archives in the i18n-sig. There were questions 
about the same problem and the answer was that there is no standard way 
to include message files with a distribution. I would like to propose an 
extension in distutils.

Most of the packages contain messages and they should be i18n-ed. The 
proposal itself contains two parts.

1. We should extend the distutils interface to allow message files to be 
installed to the default location

os.path.join(sys.prefix, 'share', 'locale')

2. Domain names for packages should be somehow standardized, especially 
in conjunction with PEP 301 (Package Index and Metadata for Distutils). 
Somehow, the package name and version should identify the message files 
that can be used.

  Les




More information about the Python-list mailing list