[opensuse-packaging] How to "Provide" <name> for python singlespec packages without the "python2/3"-prefix?

With python singlespec my package names get prepended by python3- or python2- in all cases. Can I somehow achieve to provide a package name for one of the two python versions without any "python2/3-" prefix? For example: https://build.opensuse.org/package/view_file/network:messaging:matrix/matrix... has Name: matrix-synapse but is a full python singlespec spec file yielding * python2-matrix-synapse * python3-matrix-synapse but I would like at least one package to be or "provide" matrix-synapse. If not possible I would also be ok to build it just with one python version to end up with just "matrix-synapse". But again: What's the proper way? Regards, Oliver -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Saturday, 1 July 2017 10:53:03 CEST Martin Pluskal wrote:
I don't think that works. https://build.opensuse.org/package/live_build_log/network:messaging:matrix/ matrix-synapse/openSUSE_Tumbleweed_dlp_hobdlp/x86_64 states [ 96s] python2-matrix-synapse.noarch: W: useless-provides python2-matrix- synapse [ 96s] This package provides 2 times the same capacity. It should only provide it [ 96s] once. but the spec file never stated python-… but only %{name} which is without the python-prefix. Any other ideas? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 7/1/17 10:15 PM, Oliver Kurz wrote:
Cheers M 1. https://build.opensuse.org/package/show/devel:tools/cram

hello, plusky is correct, the following will work: %ifpython3 Provides: matrix-synapse = %{version} %endif The %name macro is handled in a special way so that you can use it in subpackages and have it refer to the correct thing. Unfortunately, this breaks your usecase, because your package is not called "python-something". On 30.6.2017 21:36, Oliver Kurz wrote:
not possible I would also be ok to build it just with one python version to end up with just "matrix-synapse". But again: What's the proper way?
The expected way here is to not use singlespec ;) and require all python-related stuff in the appropriate version. That is not to say that you're doing it wrong, just that you're doing something that was not anticipated during development. All in all, using singlespec with packages that are not "python-something" is not really supported at the moment. I'm surprised (and happy) that it works as well as it does. But I'm also open to suggestions as to how it could work better and what it should do. regards m.
Regards, Oliver

On Monday, 3 July 2017 15:46:50 CEST jan matejek wrote:
That is unfortunately still not working or not doing what I wanted to achieve https://build.opensuse.org/package/view_file/network:messaging:matrix/matrix... shows that I try to do that but the "unresolvable" in https:// build.opensuse.org/project/show/network:messaging:matrix shows that the package "matrix-synapse" can not be found by test-matrix- synapse. Any other ideas?
I see. What I am trying to achieve is to support both python2 and python3 as far as possible because I don't even know yet if there would be runtime problems with any of the two versions. This is also what I want to test with https://build.opensuse.org/package/show/network:messaging:matrix/test-matrix... Regards, Oliver -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

hello, On 4.7.2017 23:17, Oliver Kurz wrote:
actually, it's working, even though it doesn't look like it :) for instance in Factory, you can see that "matrix-synapse" is provided by the rpm [1], and the test-matrix-synapse is failing because it can't find matrix-synapse dependencies. In 42.2 and 42.3, matrix-synapse is failing to build completely, and that is because you're not using the compatibility shims [2] in the spec file. regards m. [1] https://build.opensuse.org/package/binary/network:messaging:matrix/matrix-sy... [2] https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec#Compatibility_s...

On Friday, 7 July 2017 15:06:02 CEST jan matejek wrote:
Yes, I removed the compatibility shim suspecting it to implicitly add the python prefix to all "provides" but I guess I did not understand that part correctly. Ok, that seems to work now: https://build.opensuse.org/package/binary/network:messaging:matrix/matrix-sy... Thank you for pointing me to that yet another so far unknown helpful OBS subpage :-) Now I can concentrate on fixing dependencies again. Regards, Oliver -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Saturday, 1 July 2017 10:53:03 CEST Martin Pluskal wrote:
I don't think that works. https://build.opensuse.org/package/live_build_log/network:messaging:matrix/ matrix-synapse/openSUSE_Tumbleweed_dlp_hobdlp/x86_64 states [ 96s] python2-matrix-synapse.noarch: W: useless-provides python2-matrix- synapse [ 96s] This package provides 2 times the same capacity. It should only provide it [ 96s] once. but the spec file never stated python-… but only %{name} which is without the python-prefix. Any other ideas? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 7/1/17 10:15 PM, Oliver Kurz wrote:
Cheers M 1. https://build.opensuse.org/package/show/devel:tools/cram

hello, plusky is correct, the following will work: %ifpython3 Provides: matrix-synapse = %{version} %endif The %name macro is handled in a special way so that you can use it in subpackages and have it refer to the correct thing. Unfortunately, this breaks your usecase, because your package is not called "python-something". On 30.6.2017 21:36, Oliver Kurz wrote:
not possible I would also be ok to build it just with one python version to end up with just "matrix-synapse". But again: What's the proper way?
The expected way here is to not use singlespec ;) and require all python-related stuff in the appropriate version. That is not to say that you're doing it wrong, just that you're doing something that was not anticipated during development. All in all, using singlespec with packages that are not "python-something" is not really supported at the moment. I'm surprised (and happy) that it works as well as it does. But I'm also open to suggestions as to how it could work better and what it should do. regards m.
Regards, Oliver

On Monday, 3 July 2017 15:46:50 CEST jan matejek wrote:
That is unfortunately still not working or not doing what I wanted to achieve https://build.opensuse.org/package/view_file/network:messaging:matrix/matrix... shows that I try to do that but the "unresolvable" in https:// build.opensuse.org/project/show/network:messaging:matrix shows that the package "matrix-synapse" can not be found by test-matrix- synapse. Any other ideas?
I see. What I am trying to achieve is to support both python2 and python3 as far as possible because I don't even know yet if there would be runtime problems with any of the two versions. This is also what I want to test with https://build.opensuse.org/package/show/network:messaging:matrix/test-matrix... Regards, Oliver -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

hello, On 4.7.2017 23:17, Oliver Kurz wrote:
actually, it's working, even though it doesn't look like it :) for instance in Factory, you can see that "matrix-synapse" is provided by the rpm [1], and the test-matrix-synapse is failing because it can't find matrix-synapse dependencies. In 42.2 and 42.3, matrix-synapse is failing to build completely, and that is because you're not using the compatibility shims [2] in the spec file. regards m. [1] https://build.opensuse.org/package/binary/network:messaging:matrix/matrix-sy... [2] https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec#Compatibility_s...

On Friday, 7 July 2017 15:06:02 CEST jan matejek wrote:
Yes, I removed the compatibility shim suspecting it to implicitly add the python prefix to all "provides" but I guess I did not understand that part correctly. Ok, that seems to work now: https://build.opensuse.org/package/binary/network:messaging:matrix/matrix-sy... Thank you for pointing me to that yet another so far unknown helpful OBS subpage :-) Now I can concentrate on fixing dependencies again. Regards, Oliver -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
jan matejek
-
Martin Pluskal
-
Oliver Kurz