Skip to content

Commit

Permalink
Force install of ncepgrib2 if installing pygrib
Browse files Browse the repository at this point in the history
Added logic to setup.py to added ncepgrib2 to packages_to_install list
if pygrib was listed to install.  ncepgrib2 is a dependency for pygrib.
  • Loading branch information
eengl committed Aug 31, 2017
1 parent a3f0097 commit e466e45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# build options.
# Follow instructions below for editing.
[install_options]
# Provide a list of packages to install ("pygrib" or "ncepgrib2"). Both
# can be provided.
# Provide a list of packages to install.
# IMPORTANT: If installing pygrib, then ncepgrib2 must be installed as well.
#packages_to_install = []
[directories]
# uncomment and set to grib_api install location.
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def getq(self, s, k, fallback):
grib_api_libname = config.getq(
"files", "grib_api_libname", 'grib_api')

# Force ncepgrib2 in list if installing pygrib.
if "pygrib" in packages_to_install and \
"ncepgrib2" not in packages_to_install:
packages_to_install = ["pygrib","ncepgrib2"]

libraries=[]
libdirs=[]
incdirs=[numpy.get_include()]
Expand Down

0 comments on commit e466e45

Please sign in to comment.