[Distutils] How to make easy_install handle platlibs?

Buck workitharder at gmail.com
Sat Apr 11 05:53:40 CEST 2009


On Apr 10, 8:18 pm, "P.J. Eby" <p... at telecommunity.com> wrote:
> At 04:09 PM 4/10/2009 -0700, Buck wrote:
>
> >I'm trying to separate platform-specific and platform-independent
> >files on my Python installation. ./configure --prefix --exec-prefix
> >does this nicely for Python proper, but modules seem to be a whole
> >different story.
>
> > >From my testing, distutils handles this OK, putting "pure" python
> >modules into the --prefix directory and modules with binary .so's into
> >the --execprefix. I guess it defaults the install-platbase to be the
> >same as the --exec-prefix used in configure?
>
> >When running easy_install on the same packages (elementtree and
> >numpy), they all go into the platform-independant area.
>
> >Is this expected?
>
> Eggs that are platform-dependent include the platform information in
> their filename; there isn't any support for putting them in different
> directories as well.

I see the kernel version and architecture, but this is insufficient;
RedHat 4 and RedHat 5 both use a 2.6 kernel, but the difference in
provided libraries are sufficient to make many (most?) "impure"
libraries stop working ( numpy, python-ldap, and hashlib for
examples).

easy_install apparently knows when packages are platform-dependant,
and the necessary directory is sys.exec_prefix (or maybe better:
distutils.sysconfig.get_python_lib(plat_specific=1) ), so this seems
like an easy change. Would a patch be accepted?




More information about the Distutils-SIG mailing list