On Sat, 2006-09-02 at 17:23 +0200, Axel Thimm wrote:
On Sat, Sep 02, 2006 at 11:09:22AM -0400, Jesse Keating wrote:
> > On Sat, Sep 02, 2006 at 10:48:11AM -0400, Jesse Keating wrote:
> > > Due to the way that python works, if any part of a python's
> > > module is arch specific (sitearch), the entire thing has to go
> > > into sitearch. Python will not import part from sitearch and
> > > part from sitelib. So it'd all have to go in sitearch.
>
[snip]
> If you have a module, importable module that is, has an __init.py__ and
> all that, if you shove part of it in sitearch and part of it in sitelib,
> it won't work. Is this statement wrong? If so, please do explain.
You mean just the way python-elementtree (and thus yum) works exactly
that way since FC3?
Yes, that statement is wrong, just log onto a multilib system and
check ownership of parts of sitelib. For example on FC5/x86_64:
# rpm -qf --qf '%{n}-%{v}-%{r}.%{arch}.rpm\n' /usr/lib/python2.4/site-packages/*
| uniq | grep x86_64
None of your examples violate what Jesse is saying, although they may
need some explanation:
aqbanking-1.8.1beta-3.1.x86_64.rpm
- The python portion of
this exists entirely in sitelib. There's no
mixing of sitelib and sitearch.
audit-libs-python-1.1.5-1.x86_64.rpm
- There are two separate
modules in this one. audit and _audit. They
exist at the toplevel: %{sitelib}/audit.py and %{sitearch}/_audit.so.
The _audit.so portion is referenced by the audit.py portion but it is
not the same. If the modules were structured like this:
%{sitelib}/audit/{__init__.py,audit.py}
%{sitearch}/audit/{__init.py,_audit.so}
then the modules would conflict and current python will find only one of
them. [1]_
avahi-tools-0.6.10-1.FC5.x86_64.rpm
- Exists entirely in
sitelib.
python-elementtree-1.2.6-4.2.1.x86_64.rpm
- Two separate
modules: elementree in sitelib and cElementTree in
sitearch. Same as audit-libs-python.
wireshark-0.99.2-fc5.2.x86_64.rpm
- Exists entirely in
sitelib.
[1]_: Python-dev thread explaining this:
http://mail.python.org/pipermail/python-dev/2006-March/062462.html
-Toshio