[opensuse-packaging] How to properly define versioned dependencies to python-pytest
after some struggling over the weekend, I finally have my python repo mostly back in shape again. What still bugs me are versioned dependencies to pytest. Here's the current state of affairs: python-pytest (aka pytest version 5) is python3 only. This is accompanied with python-pytest4 and python-pytest3, both conflicting with python-pytest and providing python-pytest = 3.xx/4.xx. Let's ignore 3.xx for now. python-pytest provides a python3-pytest. python-pytest4 provides python{2,3}-pytest4 Tumbleweed has this prjconf in place: # python2-pytest4 should win over python2-pytest # python3-pytest should win over python3-pytest4 since pytest5 is python3 only Prefer: python2-pytest4 python3-pytest4 but I don't understand, *how* python3-pytest is winning over python3-pytest4 here? d:l:py:backports uses this prjconf: # there is python-pytest4 and python-pytest %if 0%{suse_version} < 1550 Prefer: -python-pytest4 -python2-pytest4 -python3-pytest4 %endif This results in picking python3-5.xx and python2-4.xx, if unversioned. In my youthful(lie) carelessness, I would have hoped to find some prjconf in d:l:py:pytest, that would deal with this issue, but nothing. https://en.opensuse.org/openSUSE:Build_Service_prjconf doesn't cope with such complex issues. In my project home:frispete:python, TW seems to get this right (how?), but the Leaps are suffering when using: %if 0%{?sle_version} >= 150000 && 0%{?is_opensuse} Prefer: -python-pytest4 -python2-pytest4 -python3-pytest4 %endif While this almost does, what I want, it fails for versioned pytest requests, which result in: python-coverage: conflict for providers of python2-pytest >= 4.4.0 needed by python2-pytest- xdist, (provider python2-pytest4 conflicts with python2-pytest) python-docker: conflict for providers of python2-pytest >= 3.6.0 needed by python2-pytest- timeout, (provider python2-pytest4 conflicts with python2-pytest) Although the Leaps are defined identical, 15.0 differs significantly from 15. {1,2}, but again, I don't understand, why it is differing. Could some brave soul shed some light on this, please? Thanks, Pete -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Nov 18 2019, Hans-Peter Jansen wrote:
Tumbleweed has this prjconf in place:
# python2-pytest4 should win over python2-pytest # python3-pytest should win over python3-pytest4 since pytest5 is python3 only Prefer: python2-pytest4 python3-pytest4
but I don't understand, *how* python3-pytest is winning over python3-pytest4 here?
The comment seems to be stale. It was added in revision 1097, together with the line "Prefer: python2-pytest4 python3-pytest", but that was changed in subsequent revisions without updating the comment. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am Montag, 18. November 2019, 15:12:53 CET schrieb Andreas Schwab:
On Nov 18 2019, Hans-Peter Jansen wrote:
Tumbleweed has this prjconf in place:
# python2-pytest4 should win over python2-pytest # python3-pytest should win over python3-pytest4 since pytest5 is python3 only Prefer: python2-pytest4 python3-pytest4
but I don't understand, *how* python3-pytest is winning over python3-pytest4 here?
The comment seems to be stale.
That's what I assumed as well.
It was added in revision 1097, together with the line "Prefer: python2-pytest4 python3-pytest", but that was changed in subsequent revisions without updating the comment.
Prefer: python2-pytest4 python3-pytest is what I *would* expect it to be, but again, I don't understand why Prefer: python2-pytest4 python3-pytest4 in TW is able to prefer python3-pytest, python2-pytest4 and is working for versioned dependencies, e.g. python-pytest-xdist as well: BuildRequires: %{python_module pytest >= 4.4.0} Requires: python-pytest >= 4.4.0 but obviously, I'm incapable to understand these details (nevertheless, I would like to...) Pete -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Nov 18 2019, Hans-Peter Jansen wrote:
but obviously, I'm incapable to understand these details (nevertheless, I would like to...)
Perhaps running osc buildinfo -d helps. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Andreas Schwab
-
Hans-Peter Jansen