SPECS: python.spec - enforce py_ver compatibility with provides py...

Paweł Sakowski saq at pld-linux.org
Wed Dec 22 04:06:00 CET 2004


On Tue, 2004-12-21 at 14:01 +0000, saq wrote:
> Author: saq                          Date: Tue Dec 21 14:01:48 2004 GMT
> Module: SPECS                         Tag: HEAD
> ---- Log message:
> - enforce py_ver compatibility with provides python(bytecode),
>   not by various epochless provides which don't enforce anything

So, currently the base Python packages are:

- python-libs -- the library files (that, among others, can be used to
call python code directly from C) and some most basic modules
- python -- the command-line interpreter (requires python-libs)
- python-modules -- the standard Python module library, without the ones
available in python-libs. Requires python-libs.

python-libs version 1:2.x.y-rel provides python(bytecode) = 2.x , which
you can (and should) use to enforce *.py{c,o} file format, including
the /usr/lib/python2.x directory (you should require python(bytecode) =
2.x whenever you put files in this directory).

Old-style python rpm macros are supported, but now %pyrequires_eq
python-foo actually means:

Requires: python(bytecode) = %{py_ver}
Requires: python-foo  # any version

The old %pyrequires_eq semantics didn't actually enforce any equality,
so it shouldn't be missed. Keep in mind to apply %pyrequires_eq to the
appropriate python-* package, it's been pretty inconsistent for now. So,
require python-modules if you use them, otherwise require python-libs.
The main 'python' package should only be required if your package
actually invokes /usr/bin/python manually (#!/usr/bin/python will get
added with autoreqprov).

Pending todos: test, RFC, port to AC-branch, obsolete the pyrequires_eq
macros with an autoreq rule (a post-Ac task).

I hope it isn't too late and I'm still able to make myself clear on how
things work.

-- 
Paweł Sakowski <saq at pld-linux.org>
PLD Linux Distribution





More information about the pld-devel-en mailing list