On 1.3.2017 21:35, Luigi Baldoni wrote:
Luigi Baldoni wrote
And also, since I've started playing with singlespec only today, could you please tell me what I'm doing wrong here?
%ifpython2 BuildRequires: %{python_module argparse} %endif
for completeness: instead of using %ifpython here, simply write: BuildRequires: python-argparse without conditionals and without %python_module macro
I read the introduction messages more attentively and found the answer there. Sorry, sometimes I jump the gun.
:)
Anyway I have another question: is %ifpython2 only usable for Requires and the like? I couldn't make it work for a generic command in %prep.
%ifpython2 and friends don't work in %prep/%build/%install/%check, because these sections are common to all the subpackages. IOW, the code in %prep and friends is only run once per build, and must handle all pythons at once. You can test for %if 0%{?have_python2}. But this will be true when *python2 is one of the pythons for which we build*. It does not mean that the section will only run for building the python2 version. What are you trying to do? Can't you simply do it without the conditional? m.
Regards
-- View this message in context: http://opensuse.14.x6.nabble.com/python-singlespec-how-to-convert-your-packa... Sent from the opensuse-packaging mailing list archive at Nabble.com.