Commit ba535300 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Simplified checks for optional libs.

Former-commit-id: b364098d
Former-commit-id: 2f8d2d4d
parent 4d0215a5
......@@ -3,6 +3,7 @@
from setuptools import setup, find_packages
import warnings
from importlib import util
with open('README.rst') as readme_file:
readme = readme_file.read()
......@@ -58,16 +59,12 @@ setup(
# check for pyhdf
try:
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 http://pysclint.sourceforge.net/pyhdf/install.html) for processing Terra ASTER data.'
'It is not automatically installed.') # TODO
'It is not automatically installed.')
# check for fmask
try:
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