sunchaoatmo / netcdf4-python

Automatically exported from code.google.com/p/netcdf4-python
0 stars 0 forks source link

setup.py bug? #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I was having issues with setup.py in version 1.0.4 in that it was trying to run 
just "nc-config" despite having specifying ncconfig in the setup.cfg.  I 
noticed the following block in setup.py:

if USE_NCCONFIG is not None:
    # if NETCDF4_DIR env var is set, look for nc-config in NETCDF4_DIR/bin.
    if ncconfig is None and netCDF4_dir is not None:
        ncconfig = os.path.join(netCDF4_dir,'bin/nc-config')
    else: # otherwise, just hope it's in the users PATH.
        ncconfig = 'nc-config'

I think instead it should read:

if USE_NCCONFIG is not None:
    # if NETCDF4_DIR env var is set, look for nc-config in NETCDF4_DIR/bin.
    if ncconfig is None:
        if netCDF4_dir is not None:
            ncconfig = os.path.join(netCDF4_dir,'bin/nc-config')
        else: # otherwise, just hope it's in the users PATH.
            ncconfig = 'nc-config'

At least making this change allowed the build to proceed without problems.  But 
I'm not sure if there is other logic in this I may have missed.

Karl

Original issue reported on code.google.com by karlmatt...@gmail.com on 2 May 2013 at 5:40

GoogleCodeExporter commented 8 years ago
OK, that looks reasonable. Committed in r1240.

Original comment by whitaker.jeffrey@gmail.com on 2 May 2013 at 6:03

GoogleCodeExporter commented 8 years ago

Original comment by whitaker.jeffrey@gmail.com on 26 Feb 2014 at 2:04