[86243] trunk/dports/python

Ryan Schmidt ryandesign at macports.org
Sun Oct 23 15:54:49 PDT 2011


On Oct 23, 2011, at 15:04, adfernandes at macports.org wrote:

> Revision: 86243
>          http://trac.macports.org/changeset/86243
> Author:   adfernandes at macports.org
> 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.



More information about the macports-dev mailing list