Commit 2f8d2d4d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Simplified checks for optional libs.

Former-commit-id: b364098d
parent 3f9c125a
......@@ -3,6 +3,7 @@
from setuptools import setup, find_packages
import warnings
from importlib import util
with open('README.rst') as readme_file:
readme =
......@@ -58,16 +59,12 @@ setup(
# check for pyhdf
import pyhdf
except ImportError:
if not util.find_spec('pyhdf'):
warnings.warn('If you have not compiled GDAL with HDF4 support you need to install pyhdf manually '
'(see for processing Terra ASTER data.'
'It is not automatically installed.') # TODO
'It is not automatically installed.')
# check for fmask
import fmask
except ImportError:
if not util.find_spec('fmask'):
warnings.warn("FMask library is missing. If you want to compute cloud masks via FMask, you have to install it "
"manually (e.g., by running 'conda install -c conda-forge python-fmask').")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment