Le 10/09/2014 21:40, Andrew Daugherity a écrit :
I would not consider myself a "python packaging expert", but I've done a bit of it for our internal repo.
According to https://en.opensuse.org/openSUSE:Packaging_Python#File_lists there are two macros: """ • %python_sitelib expands to /usr/lib/pythonX.Y/site-packages. This is the install location for platform-independent modules. • %python_sitearch expands to %{_libdir}/pythonX.Y/site-packages, that is, either /usr/lib or /usr/lib64, depending on your architecture. This is the install location for platform-dependent modules. """
Since the build log is complaining about a noarch package installing stuff under /usr/lib64, I see two options: * use %python_sitelib, not %python_sitearch * make the package not be noarch
I think you may have to use the latter solution for SLES 11 -- looking at /usr/lib/rpm/macros, both s11sp3 and opensuse 12.3 define them like this: %python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())") %python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
However on SLES 11, both of them return /usr/lib64/python2.6/site-packages. Looking at the source (/usr/lib64/python2.X/site-packages/distutils/sysconfig.py, part of python-base), there's different logic in the opensuse one to return 'lib' for certain cases and sys.lib (i.e. 'lib' on i586, 'lib64' on x86_64) in others, which simply isn't present in the SLES version.
TL;DR: It appears you need to wrap your noarch setting inside a %suse_version check that excludes SLES 11.
-Andrew
Quickly, as a d:l:p maintainer, if you meet one day this kind of issue, use this little hack %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif Olav, I fixed your package -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org