Skip to content

Commit

Permalink
remove the old esmfmkfile.py strategy from ESMPy
Browse files Browse the repository at this point in the history
  • Loading branch information
rokuingh committed Aug 24, 2022
1 parent 512b56a commit d808ee9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/addon/ESMPy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ PET*
build
dist
doc/esmpy_doc
src/ESMF/interface/esmfmkfile.py
src/ESMPy.egg-info
examples/data
src/ESMF/test/data
Expand Down
1 change: 0 additions & 1 deletion src/addon/ESMPy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ clean:
find . -name "*.python-version" -exec rm -f {} \;
rm -rf src/ESMF/test/regrid_from_file/data
rm -rf examples/data
rm src/ESMF/interface/esmfmkfile.py

install:
python3 -m pip install --user .
Expand Down
19 changes: 2 additions & 17 deletions src/addon/ESMPy/src/ESMF/interface/loadESMF.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,10 @@
raise ImportError('The CTypes library cannot be found.')

esmfmk = None
mked = False
esmfmkfile_local = os.path.join(os.getcwd(),"src/ESMF/interface/esmfmkfile.py")
try:

if os.path.isfile(esmfmkfile_local):
from ESMF.interface.esmfmkfile import ESMFMKFILE as esmfmk
mked = True
esmfmk = os.environ["ESMFMKFILE"]
except:
raise ImportError('The esmf.mk file could not be loaded.')
else:
if not mked:
esmfmk = os.getenv("ESMFMKFILE")
if not esmfmk:
raise ImportError('The ESMFMKFILE was not set in the build, nor is it available as an environment variable.')
else:
with open(esmfmkfile_local, 'w') as emfl:
emfl.write('ESMFMKFILE = "'+esmfmk+'"')
emfl.close()

raise ImportError('The ESMFMKFILE environment variable is not available.')

#### INVESTIGATE esmf.mk ######################################################

Expand Down

0 comments on commit d808ee9

Please sign in to comment.