[104467] trunk/dports/python/py-netcdf4/Portfile

Sean Farley sean at macports.org
Mon Mar 25 19:02:11 PDT 2013


On Mon, Mar 25, 2013 at 8:21 PM, Clemens Lang <cal at macports.org> wrote:
> Hi,
>
> On Mon, Mar 25, 2013 at 04:58:19PM -0700, sean at macports.org wrote:
>> py-netcdf: fix build error by using the same compiler as netcdf
>
>> +    # py-netcdf4's setup.py uses nc-config for flags and libs but not compiler
>> +    configure.cc        [exec ${prefix}/bin/nc-config --cc]
>
> This change will essentially kick py\d+-netcdf4 out of the index,
> because the Portfile fails to execute when nc-config is not present:
>
> Failed to parse file python/py-netcdf4/Portfile with subport 'py26-netcdf4': couldn't execute "/opt/local/bin/nc-config": no such file or directory
> Failed to parse file python/py-netcdf4/Portfile with subport 'py27-netcdf4': couldn't execute "/opt/local/bin/nc-config": no such file or directory

Youch. Thanks for letting me know!

> Consider setting the compiler in a phase (which is suboptimal, because
> automatic compiler dependencies will not work). You should however
> probably set configure.compiler anyway, to also change all dependent
> settings, like the preprocessor, etc.

Well, py-netcdf4 depends on netcdf so it should get its compiler
dependencies that way. Setting configure.compiler is a not really
possible since netcdf could depend on hdf5 which depends on mpi, so
there'd be be no way of knowing if we should set it to clang / gcc or
mpicc :-/


More information about the macports-dev mailing list