[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-packaging
Subject:    Re: [opensuse-packaging] Factory submission policy in light of default-python switch
From:       jan matejek <jmatejek () suse ! cz>
Date:       2017-06-30 14:17:19
Message-ID: ac9731f4-d10a-1467-be92-b76ecba25de6 () suse ! cz
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On 29.6.2017 20:45, Greg Freemyer wrote:
>> this looks like a wrong approach to me.
>> why can't you require python2-smdev? having a version-free provides seems to ask for provider
>> conflicts, iiuc?
> 
> I likely made a rash assumption in the past.
> 
> I assumed that if as an example I did a provides pysmdev in both
> python2-smdev and python3-smdev, and then did a "requires smdev" in
> python-plaso, zypper would be smart enough to give me the version
> appropriate to the python version in use.
> 
> Is there a python neutral "requires" statement?  Or does it have to be
> explicit from the top down?

In general, it needs to be explicit from the top down. Your end app knows which version it's using
and should require the appropriate libraries.

With singlespec, you can specify "Requires: python-something" and it gets rewritten to the
appropriate version. There's a vague plan to expand this functionality to non-library packages, but
nothing that works today.

I'm not even sure if rpm/zypper can express this sort of dynamic dependency. What you did, with the
unversioned symbol, seems to me to lead to a bunch of "Prefer" lines in the prjconf.
Perhaps for you it would be easiest to say something like:

%define mypython python2
BuildRequires: %{mypython}-foo
Requires: %{mypython}-foo

and then switch %mypython to the appropriate flavor?
Or if you want to keep with the distro preferred language, you can use %system_python from
python-rpm-macros.

regards
m.


["signature.asc" (application/pgp-signature)]
-- 
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic