How to check for generic python variant?

Ryan Schmidt ryandesign at macports.org
Sun Mar 17 17:08:25 UTC 2019



> On Mar 17, 2019, at 11:42, Ruben Di Battista wrote:
> 
> To be clear, what I would like to achieve is:
> 
> If {[variant_isset python{27,35,36,37}]}
>     Do something
> 
> I’m not a ninja with TCL, so I’m asking what is the right way of doing this. Do I need to have an if condition for each variant?

Yes. 

if {[variant_isset python27] || [variant_isset python35] || [variant_isset python36] || [variant_isset python37]} {
    ...
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190317/c5c05009/attachment.html>


More information about the macports-dev mailing list