Checking that a given variant of a port is active

Joshua Root jmr at
Tue May 20 08:44:06 PDT 2008

Adam Mercer wrote:
> In trying to fix #14240, scipy failing to build on Tiger using g95 as
> the fortran compiler; I am wondering if its possible, in a pre-fetch
> phase for example, to determine if a given variant of a specific port
> is active. More precisely in the scipy ports I want to check that
> numpy has been built using either the gcc42 or gcc43 variants, is this
> possible and how would I go about determining this?
> A bit of background information: average users of numpy itself will
> probably not need the fortran aspects of numpy, i.e. f2py, therefore
> for the upcoming numpy-1.1.0 (and corresponding scipy-0.7.0)
> release(s) I am thinking of moving all numpy fortran support to
> non-default variants. scipy however requires a numpy built using a
> fortran compiler. I therefore need to ensure that numpy has been built
> with either gcc42 or gcc43 fortran support prior to trying to build
> scipy.

1. This would require access to the registry, which is not an API that 
is meant to be exposed in Portfiles.

2. Maybe it would be possible to call registry::installed from a 
Portfile anyway, which would give you a list of all the installed 
versions and variants for a given port name (and their activation 
status). However, my understanding of the namespaces, sub-interpreters 
and so forth is not good enough to say how difficult that would be.

3. What you really want is for #126 to be fixed. 


More information about the macports-dev mailing list