On Oct 23, 2011, at 15:04, [email protected] wrote:

> Revision: 86243
>          http://trac.macports.org/changeset/86243
> Author:   [email protected]
> Date:     2011-10-23 13:04:20 -0700 (Sun, 23 Oct 2011)
> Log Message:
> -----------
> py-mpi4py : consolidated into subport system, made openmpi the default with 
> mpich2 as a variant, #31675

> Modified: trunk/dports/python/py-mpi4py/Portfile
> ===================================================================
> --- trunk/dports/python/py27-mpi4py/Portfile  2011-10-23 17:56:28 UTC (rev 
> 86238)
> +++ trunk/dports/python/py-mpi4py/Portfile    2011-10-23 20:04:20 UTC (rev 
> 86243)


> +if {  ${os.major} < 9 && [variant_isset mpich2] } {
> +    error "Mac OS 10.4 and earlier require openmpi"
> }


Errors should not be thrown in the main part of the port. This will for 
instance prevent 10.4 users from running "port info" on this port or running 
"portindex" or "sudo port clean all". Errors may only be thrown in a phase, for 
example a pre-configure block would be an appropriate place.

They should also be restricted to platform darwin somehow.

But even better than errors for unsupported variants might be to just hide the 
variant entirely on 10.4. You could enclose the definition of the mpich2 
variant in a "if {${platform} != "darwin" || ${os.major} > 8}" block.

FYI, 10.4 is the earliest version of Mac OS X that MacPorts can be compiled on, 
so "and earlier" isn't applicable.

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to