[Distutils] Re: [I18n-sig] Codecs for Big Five and GB 2312

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 31 Oct 2000 19:21:27 +0100


> Ok, but why is installing the codecs using a separate package and
> then adding them to site.py such a pain ?

You mean sitecustomize.py, I assume. Because hand-editing files as
part of the installation process is a pain, and because automatic
adding of it is not feasible.

To give an analogy, for years, Emacs users had to edit their .emacs
files to integrate additional packages. Eventually, various means to
support automatic adding of stuff were added, and user interfaces were
designed to allow interactive manipulation of the settings that still
needed user input (the customize mechanism). Having a place where
customization can be added is but a start to support other people's
work.

> > I think it is, and apparently Tamito thinks that way as well, since
> > the JapaneseCodecs install themselves into the Python installation, to
> > be always available.
> 
> No third-party package should install itself into the standard
> Python installation. That's simply wrong.

Well, I agree its wrong - however I also appreciate the problem that
this solves (which apparently you don't). Tell him a different but
"better" way to achieve the same effect, and he'll probably use it.

> Which I did by proposing to have the encodings search function
> try to import a package called 'sitecodecs'. The JapaneseCodecs
> package would then install itself into that site specific
> host package.

Ok, that is something that may work in Python 2.1, so some mechanism
for the time being is required. Although, thinking about it - how
exactly would that work? Suppose all files of JapaneseCodecs are in a
single directory, call it "japanese". Then, this directory is copied
into

/usr/local/lib/python2.0/site-packages/sitecodecs/japanese

I can't see how that alone would make it available, even if codecs.py
would import sitecodecs. More general: how would multiple codecs
installed into sitecodecs coordinate with each other?

Regards,
Martin