Mailinglist Archive: opensuse-packaging (250 mails)

< Previous Next >
[opensuse-packaging] python modules as noarch - for real this time
  • From: Jan Matejek <jan.matejek@xxxxxxxxxx>
  • Date: Tue, 11 Aug 2009 20:44:00 +0200
  • Message-id: <h5se5h$p7b$1@xxxxxxxxxxxxx>
Fellow python packagers,

Now it is time to review your packages and find out whether they can be
built noarch.
(hint: if you see "no-binary" warning in rpmlint output, you can switch
to noarch)
I'm currently going through d:l:py repository and switching as
necessary, but not everything pythonic is in there, and sometimes i'm
not sure whether the package needs to be submitted to factory or not.

If you need to maintain compatibility with older distros, you can use
this expression i've devised:

%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch

in earthspeak: IF (suse_version is defined AND bigger than 1110) OR
(suse_version is undefined) THEN build noarch
(both mandriva and fedora seem to have python packages noarch'd)

if you keep your own filelists and need the new macros, just add an
%else branch with the definitions you need:

%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(True)")}

as mentioned in the old thread, it might happen that we define those
macros in project configs. but maybe not.

with kind regards

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

< Previous Next >
This Thread
Follow Ups