Mailinglist Archive: opensuse-factory (1134 mails)

< Previous Next >
Re: [opensuse-factory] Python for after 12.2
  • From: Sascha Peilicke <saschpe@xxxxxx>
  • Date: Mon, 25 Jun 2012 13:55:03 +0200
  • Message-id: <>
On 06/25/2012 11:12 AM, todd rme wrote:
Considering all of the talk about improving openSUSE quality, and with
12.2 branched, I would like to discuss somewhat how to move forward
with Python packaging in openSUSE.

There are three big things happening right now with Python for openSUSE.


There are 3 other issues, which are more openSUSE-specific.

First is the new python autodeps system, which should allow the
requires of Python 2 and 3 packages to be automatically detected.
This will make packaging python easier and installing python packages
more reliable. It still needs testing. I suggest a tiered approach:
first, which I am doing now, I am testing it against all the python
packages in devel:languages:python3. If that seems to work, I will
then switch to implementing it directly in devel:languages:python3.
If that works, I also implement it in devel:languages:python. If that
works, it can be implemented globally (at least for Factory build
I'm glad it's picked up, but be careful about the "requires ...
automatically detected". Actually, only provides are automatic and I
strongly prefer that requires remain generated by scripts such as
py2pack and are explicitly stated in the spec file (so that you can
comment them out in case of ...). This is the same as our Perl friends
to BTW. :-)

The second is --record-rpm. This allows python to automatically
list files that are then used by rpm file lists. As far as I
understand this is an openSUSE-specific hack whose use is now
discouraged. It also leads to some problems, especially if the
upstream package name changed. If this understanding is correct, I
think this should be officially deprecated, with a plan to remove it
for 2 releases after 12.2. For the release after 12.2, I think it
should go through a few stages. First, add an rpmlint warning about
the use of this build option. After a couple months, upgrade the
badness of this warning so it causes an automatic package failure. A
few months after that, change the warning to an error. No packages in
Factory should use the option.
I think we shouldn't have much packages left that still use
'--record-rpm'. Also, at least I remove that whenever I touch a

Similarly, there is really no need for '--skip-build' when you do
'python install' in the %install phase when you already have a
"python build" in %build. Setuptools is clever enough to not
re-generate byte-code.

Lastly, "-O1" doesn't do anything useful either.

Finally, there is the use of the common %{python_sitelib}/* and
%{python_sitearch}/* items in the rpm files list. These have been
used a lot because they make packaging easier. However, they have the
disadvantage, in my opinion, that there can be (and are) major changes
in the upstream package, even complete name changes, that go
undetected because these commands essentially match every possible
python file. I think we should discourage this in the wiki, reject
new packages that use it, and add an rpmlint warning for it, with the
goal of removing this entirely from the next openSUSE release.
Yes, actually they have been used to ease cross-distro building (due to
inconsistent *.egg-info directory names), which unfortunately never took
off in d:l:p.

I am fine with doing it either way but the exact file list isn't always
easy to generate in scripts (in contrast to %{python_sitelib}/*).

So does anyone have opinions on these proposals? I know this is a big
wall of text, so I can break it up into individual messages with
different issues you think that would simplify reading or discussion.
%py_requires is another one, it is still needed for SLE_11_SP2 (rpm is
too old). But as I was basically the only one fixing build errors in
d:l:p for quite a while and most of them where (and still are) for SLE,
I think it would be ok to continue ignoring that...
Viele Grüße,
Sascha Peilicke

< Previous Next >
Follow Ups