[Mailman-Developers] japanesecodes-1.4.5 install prob
Barry A. Warsaw
barry@zope.com
Fri, 26 Apr 2002 13:42:39 -0400
[I'm Cc'ing the distutils wizard and the JapaneseCodecs author, since
I believe this is a bug in one of those two systems -BAW]
>>>>> "RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> When I try to install mailman now I'm getting:
RJ> for p in email-2.0.1 JapaneseCodecs-1.4.5 KoreanCodecs-1.0.0;
RJ> \ do \
RJ> gunzip -c $p.tar.gz | tar xf -; \ (cd $p ;
RJ> PYTHONPATH=/home/mailman/pythonlib /usr/local/bin/python setup.py
RJ> --quiet install --install-lib /home/mailman/pythonlib); \
RJ> done error:
RJ> /usr/local/lib/python2.2/site-packages/japanese.pth:
RJ> Permission denied *** Error code 1 make: Fatal error: Command
RJ> failed for target `install-packages' Current working directory
RJ> /usr/local/src/mailman-dev/mailman/misc *** Error code 1 make:
RJ> Fatal error: Command failed for target `doinstall'
RJ> Which of course, is correct, since as a non root users I can't
RJ> write to site-packages... But which is shouldn't be trying to
RJ> write *to*..
The problem I believe is in either distutils, or the way the Japanese
codec package setup.py file is written.
"python setup.py --help install" says:
Options for 'Install' command:
[...]
--install-base base installation directory (instead of --prefix or --
home)
--install-platbase base installation directory for platform-specific files
(instead of --exec-prefix or --home)
--root install everything relative to this alternate root
directory
--install-purelib installation directory for pure Python module
distributions
--install-platlib installation directory for non-pure module distributions
--install-lib installation directory for all module distributions
(overrides --install-purelib and --install-platlib)
--install-headers installation directory for C/C++ headers
--install-scripts installation directory for Python scripts
--install-data installation directory for data files
So I've been using --install-lib to put the JapaneseCodecs package
(as well as the email and KoreanCodecs packages) in $(PYTHONLIBDIR),
which by default is /usr/local/mailman/pythonlib.
The problem comes because the japanese.pth file doesn't honor
--install-lib. Trial and error shows that if I include
--install-purelib $(PYTHONLIBDIR) then japanese.pth goes in the right
place, e.g. /usr/local/mailman/pythonlib. So as a workaround, I've
made this change.
>From the JapaneseCodecs setup.py file:
-------------------- snip snip --------------------
class Install(install):
def finalize_options (self):
install.finalize_options(self)
self.distribution.data_files = [
(self.install_purelib, ["japanese.pth"])]
-------------------- snip snip --------------------
and according to the help text above, shouldn't self.install_purelib
be coming from my --install-lib option? Is this a bug in distutils?
Or does the setup.py file need to be fixed?
Note: Python 2.2.1 being used.
-Barry