setting a variable in a variant for later use
Jonathan Stickel
jjstickel at gmail.com
Thu Oct 18 08:12:08 PDT 2012
I am trying to set a variable in a variant for later use in another
variant, but I am getting errors that the variable does not exist. Here
are the relevant lines:
variant python26 conflicts python27 description {Configure to use Python
version 2.6} {
set python.version 26
}
variant python27 conflicts python26 description {Configure to use Python
version 2.7} {
set python.version 27
}
if { ![variant_isset python26] } {
default_variants +python27
}
variant tkinter description {use py-tkinter backend} {
depends_lib-append port:py${python.version}-tkinter
}
variant pygtk description {use py-gtk backend} {
depends_lib-append port:py${python.version}-gtk
}
default_variants-append +pygtk
When I do a portindex, I get:
Error: inkscape-textext: Error executing pygtk: can't read
"python.version": no such variable
I suppose I could nest the variants somehow, but that seems messy. Any
suggestions about how to handle this cleanly?
Thanks,
Jonathan
More information about the macports-dev
mailing list