[68182] trunk/dports/python

Daniel J. Luke dluke at geeklair.net
Fri May 28 12:34:05 PDT 2010


On May 28, 2010, at 2:43 PM, Ryan Schmidt wrote:
> On May 28, 2010, at 13:36, Ryan Schmidt wrote:
>>> +default_variants    python26
>> 
>> The correct syntax is "default_variants +python26"
> 
> And you don't want to set default_variants to python26 if the user has already selected one of the other variants. So you really want:
> 
> if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset python27]} {
> 	default_variants +python26
> }

Or just have the +python26 stuff in the main part of the portfile and have the other +pythonXX variants just remove/replace what they need to.

Then you don't have a dependency external to any new variants you may add in the future (say for other versions of python), and instead each new variant is relatively self-contained.

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+





More information about the macports-dev mailing list