How to check for generic python variant?
Ruben Di Battista
rubendibattista at gmail.com
Sun Mar 17 16:42:24 UTC 2019
Thank you Chris for the response,
I was probably not clear enough.
I’m trying to overhaul the Portfile because I’m hitting a problem with the compilation of the mpi4py package that currently in the Portfile is compiled from VTK itself, but it should instead be provided by the system. In the current VTK portfile there are already all the python variants, but I would like to check if one of them was selected by the user, and then apply some configuration options related to whatever python variant was chosen.
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? Because I could also write the configuration option in all the variant bodies, but it would be a bit ugly since a will be duplicating the same code…
I don’t know if it’s clearer now… I need to check for a python variant to be selected by the user, whatever version it is, and applying some configuration options if it is set.
_
-. .´ |∞∞∞∞
', ; |∞∞∞∞∞∞
˜˜ |∞∞∞∞∞∞∞∞∞ RdB
,., |∞∞∞∞∞∞
.' '. |∞∞∞∞
-' `’
https://rdb.is
On 17 March 2019 at 17:35:19, Chris Jones (jonesc at hep.phy.cam.ac.uk) wrote:
Hi,
On 17 Mar 2019, at 4:14 pm, Ruben Di Battista <rubendibattista at gmail.com> wrote:
Hello,
I’m trying to improve VTK portfile. I would like to be able to check for a python variant to be enabled, whatever it is, whatever version of python. How do I do that?
There is no such thing as a generic python variant. You should provide variants that use the various different python versions that macports supports, whatever VTK can support, and leave it to the user to decide which they wish to use, if need be picking one as a default variant (python 3.7 would be the obvious choice).
Chris
_
-. .´ |∞∞∞∞
', ; |∞∞∞∞∞∞
˜˜ |∞∞∞∞∞∞∞∞∞ RdB
,., |∞∞∞∞∞∞
.' '. |∞∞∞∞
-' `’
https://rdb.is
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190317/76bc183d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP using AMPGpg
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190317/76bc183d/attachment.sig>
More information about the macports-dev
mailing list