Mailinglist Archive: opensuse-buildservice (171 mails)

< Previous Next >
Re: [opensuse-buildservice] python, buildarch, and post build checks
  • From: Jon Nelson <jnelson-suse@xxxxxxxxxxx>
  • Date: Wed, 2 Sep 2009 14:14:39 -0500
  • Message-id: <cccedfc60909021214r3e7f1d5bn8456b36a842d9905@xxxxxxxxxxxxxx>
On Wed, Sep 2, 2009 at 1:44 PM, Michael E Brown<Michael_E_Brown@xxxxxxxx> wrote:
On Wed, Sep 02, 2009 at 01:21:56PM -0500, Jon Nelson wrote:
Using as my remote repo, I've been
getting errors like this:

"/usr/lib64/python2.6/site-packages/setuptools/command/setopt.pyc" is
not allowed in a noarch package.

However, /usr/lib64/python2.6 is where the python installation is located.

I see two conflicting problems here:

1. the package really is arch independant. .pyo and .pyc files are,
this provides no shared libraries, etc...
2. the python install is directing the package to usr /usr/lib64

I don't want to remove the BuildArch: noarch directive, as the package
really is noarch.

Where *should* the package be installing so that it doesn't trigger this

Also, how do I turn off individual post-build checks (like the bz2
check) for local OBS instances?

I am having a very similar problem.
RPM build errors:
File not found by glob:
System halted.

It looks to me like python and rpm disagree over what py_sitedir should be. I
have this in my spec file:
    # per fedora and suse python packaging guidelines
    # suse: will define py_sitedir for us
    # fedora: use the !? code below to define when it isnt already
    %{!?py_sitedir: %define py_sitedir %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}

And then I use "%{py_sitedir}/*" in my %files list. It looks like py_sitedir
is set to one thing and python is installing the files elsewhere.

I'm wondering if this isn't part of a larger problem:

python .py files are arch independant. IMO, that means that they
should be in noarch packages.
.so python modules are *not* arch independant, and so they should end
up in x86_64, i586, and so on packages.

However, python (the package) is clearly arch specific
(/usr/bin/python and all of the .so modules are, anyway, even if the
.py, .pyo, and .pyc are not). The python *package* uses /usr/${arch}
or some such.

My reading of the FHS seems to suggest that python should use:

/usr/lib/python/i386/ for all i386/i586 arch-specific bits
/usr/lib/python/x86_64/ for all x86_64 arch-specific bits
/usr/share/python/ for everything else (.py, .pyo, .pyc and other arch
independant bits)

This means 3x site-packages directories, and each package ending split
up over 3 different locations within those site-packages. This seems a
bit over the top, but I suspect it can be done easily by tweaking
distutils.cfg (provided *by* the python package).

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >