Mailinglist Archive: opensuse-packaging (102 mails)

< Previous Next >
[opensuse-packaging] Re: Some more python singlespec questions/suggestions
On 12.4.2017 17:01, Todd Rme wrote:
Try here:

I get errors like this outside Tumbleweed: "nothing provides
%{python_module, nothing provides testtools = %{version}}"

You're missing this line:
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Because it's used in BuildRequires, it must be either in prjconf (in Factory)
or in the spec file.

Even in setuptools, you sometimes need to run %py_compile due to, for
example, "inconsistent mtime" rpmlint warnings.

If you get "inconsistent mtime" from install, it's either the
installer's or your packaging
bug. Usually you're running tests that touch things they shouldn't.

(But yes, %py_compiling it again is often easier than fixing it properly.)

But more and more packages are shipping wheels only, so having support
for %py_compile, and less importantly "pip install", is becoming

wouldn't "pip install" take care of it too?

In any case I'm not convinced that this should be a part of the "singlespec
API". Basing decision on
"major version of python", as opposed to "is this python2 or something
newer", does not look like a
good practice.
(and if it's limited to one package, you can easily get, e.g. from
OTOH, maybe this distinction will be useful again with Python 4 somewhere
down the road, so perhaps?

I agree with you, but this is an upstream decision.

And also easily resolvable inside the spec file.
The question here is whether this should be directly supported by a singlespec

One more point against it that it's not general: for instance, in LXML, you run
"make test" for
python2 tests and "make test3" for python3. Here you would need a variable that
is "" for python2
and "3" for python3. In other cases, you need "2" for python2 and "3" for
python3. Next time it
might be "2" for python2, "pp" for PyPy and "" for python3?

...and as long as you're if'ing it anyway, you can do this:
if [ %{$python_version_nodots} -ge 30 ]; then

or even:
mysuffix=`expr %{$python_version_nodots} / 10`


< Previous Next >
Follow Ups