Mailinglist Archive: opensuse-packaging (250 mails)

< Previous Next >
Re: [opensuse-packaging] python modules as noarch - for real this time
  • From: Luke Imhoff <luke@xxxxxxxx>
  • Date: Wed, 12 Aug 2009 08:12:51 -0500
  • Message-id: <4A82BFD3.5040502@xxxxxxxx>
Something else that bugged me about how python (and other non-C-and-C++) packages are layed out in OBS and the rpms labelled:

Python packages that aren't part of the standard python libraries are in d:lang:py and not in d:libs:py. Why don't we use d:libs for anything besides 'c and c++' (devel:libraries:c_and_c++)? There's even d:lang:ruby:extensions, which really should be d:libs:ruby logically.

The Group for the rpms also says Development/Languages/Python. Shouldn't it be Development/Libraries/Python?

Jan Matejek wrote:
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
%endif

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
%else
%{!?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)")}
%endif

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

with kind regards
m.


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

< Previous Next >
This Thread
References