On 7.3.2017 18:42, Luigi Baldoni wrote:
There's still something I don't understand: how do I handle runtime dependencies if they're different for py2 and py3?
you wrap them in %ifpython2 / %ifpython3 / %ifpypy3 declarations i have clarified this a little in point 3. Please let me know if you still think that this should be explained better, or maybe more prominently?
And if I put python-foo and python3-bar in Requires, how is Factory
going to
untangle that?
python-foo will be translated to python2-foo, python3-foo, or whichever is appropriate for the target package. If your package is called "python3-something", then python3-bar will get the same treatment. The rewriter is looking for packages that start the same as the main package. So basically, if your package is called "python3-something", then it expects to see: Name: python3-something Requires: python3-foo and creates subpackage with: Name: python2-something Requires: python2-foo If your package is *not* called python3, but only "python-something", so it looks like this: Name: python-something Requires: python3-foo then "python3-foo" is left alone -- and copied to all subpackages, so even "python2-something" will require "python3-foo". What you probably mean to write in such case is: Name: python-something %ifpython3 Requires: python3-foo %endif in which case, only the "python3-something" package gets the "python3-foo" requirement. You could also say: Name: python-something %ifpython3 Requires: python-foo %endif and the same thing would happen: your "python3-something" package gets "python3-foo" requirement. --- If you need to avoid this, and simply copy the unchanged package name, you need to hide it behind a macro: Name: python-something %define oldpython python Requires: %{oldpython}-foo in this case, all subpackages (python2-something, python3-something) have requirement on "python-foo". hope this helps m.