openSUSE / python-rpm-macros

Multi-Python, Single-Spec macros generator
Other
22 stars 20 forks source link

issues with %pythons definition for older openSUSE distributions #16

Closed frispete closed 6 years ago

frispete commented 6 years ago

In an attempt to build python packages with %pythons build requirements, I tried to define this macro correctly, but failed so far.

  1. attempt: no %pythons definition results in: nothing provides %{pythons} for Leap 42.* and below

  2. attempt:

    %if 0%{?suse_version} <= 1320
    Macros:
    %pythons %{?!skip_python2:python2} %{?!skip_python3:python3}
    :Macros
    %endif

    results in: nothing provides python2 for 13.2 and 42.1, although python-base has /usr/bin/python2, but proably isn't providing it directly. While at it, an additional FileProvides: /usr/bin/python2 python-base doesn't cut it as well.

  3. attempt:

    %if 0%{?suse_version} <= 1320
    Macros:
    %pythons %{?!skip_python2:python} %{?!skip_python3:python3}
    :Macros
    %endif

results in:

[   31s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' --define 'disturl obs://build.opensuse.org/home:frispete:python-testing/openSUSE_13.2/0a3a43f2eb669db8996f9a1ec0207fae-python-hypothesis' /home/abuild/rpmbuild/SOURCES/python-hypothesis.spec
[   31s] error: Package already exists: %package -n python-hypothesis

That one is the most disturbing one. It looks like the %pythons macro interferes with %python_subpackages here for 13.2 and 42.1.

I'm running out of ideas right now. I can remove that requirement in the spec of course, or protect it with a conditional, but a proper fix would be preferable.

I've setup a test repo here, where I try to build python-hypothesis without manual intervention.

Any hints are much appreciated.

scarabeusiv commented 6 years ago

Yes the python base on old distros didnt contain: Provides: python2 = %{version}

As both 13.2 and 42.1 are year+ without support just add patch for python package yourself.

The last attempt you are shooting yourself to leg so it would never work.

mcepl commented 6 years ago

Ehm, sorry, but bugs on unsupported distributions just won't be fixed here. You can make your personal project on OBS, but we won't do anything about it.