Tweak nccmp to be more spack-compatible.
- Spack doesn't set F90, but it confuses the nccmp build. Just remove it from the environment. - TODO: should build environment unset this variable?
This commit is contained in:
parent
1cc94a0f79
commit
0f427ed334
@ -1,5 +1,4 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
import os
|
|
||||||
|
|
||||||
class Nccmp(Package):
|
class Nccmp(Package):
|
||||||
"""Compare NetCDF Files"""
|
"""Compare NetCDF Files"""
|
||||||
@ -15,16 +14,10 @@ def install(self, spec, prefix):
|
|||||||
# FCFLAGS respectively in this configure, please unset
|
# FCFLAGS respectively in this configure, please unset
|
||||||
# F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure
|
# F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure
|
||||||
# again.
|
# again.
|
||||||
os.environ['FC'] = os.environ['F90']
|
env.pop('F90', None)
|
||||||
del os.environ['F90']
|
env.pop('F90FLAGS', None)
|
||||||
try:
|
|
||||||
os.environ['FCFLAGS'] = os.environ['F90FLAGS']
|
|
||||||
del os.environ['F90FLAGS']
|
|
||||||
except KeyError: # There are no flags
|
|
||||||
pass
|
|
||||||
|
|
||||||
configure('--prefix=%s' % prefix)
|
configure('--prefix=%s' % prefix)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make("check")
|
make("check")
|
||||||
make("install")
|
make("install")
|
||||||
|
Loading…
Reference in New Issue
Block a user