Skip to content
Snippets Groups Projects
Commit bffb61cf authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Simplified dependency checks.

parent 4abdb080
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -3,6 +3,7 @@
"""Top-level package for arosics."""
import warnings
from importlib import util
from arosics.CoReg import COREG
from arosics.CoReg_local import COREG_LOCAL
......@@ -11,8 +12,8 @@ from arosics.Tie_Point_Grid import Tie_Point_Grid
__author__ = """Daniel Scheffler"""
__email__ = 'daniel.scheffler@gfz-potsdam.de'
__version__ = '0.6.0'
__versionalias__ = '2017-10-10_01'
__version__ = '0.6.1'
__versionalias__ = '2017-10-10_02'
__all__ = ['COREG',
'COREG_LOCAL',
'DESHIFTER',
......@@ -20,10 +21,7 @@ __all__ = ['COREG',
# check optional dependencies
try:
import pyfftw
except ImportError:
pyfftw = None
if not util.find_spec('pyfftw'):
warnings.warn('PYFFTW library is missing. However, coregistration works. But in some cases it can be much slower.')
del warnings, pyfftw
del util, warnings
......@@ -5,6 +5,7 @@
from setuptools import setup, find_packages
import warnings
from importlib import util
with open('README.rst') as readme_file:
readme = readme_file.read()
......@@ -27,7 +28,7 @@ test_requirements = requirements + ['coverage', 'nose', 'nose-htmloutput', 'redn
setup(
name='arosics',
version='0.6.0',
version='0.6.1',
description="An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data",
long_description=readme + '\n\n' + history,
author="Daniel Scheffler",
......@@ -59,23 +60,17 @@ setup(
)
# check for pyffw
try:
import pyfftw
except ImportError:
# check for pyfftw
if not util.find_spec('pyfftw'):
warnings.warn('You need to install pyfftw manually (see https://pypi.python.org/pypi/pyFFTW) for speeding up '
'the computation. It is not automatically installed.') # TODO
'the computation. It is not automatically installed.')
# check for basemap
try:
from mpl_toolkits.basemap import Basemap
except ImportError:
if not util.find_spec('mpl_toolkits.basemap'):
warnings.warn('You need to install basemap manually if you want to plot maps (see www./matplotlib.org/basemap). '
'It is not automatically installed.') # TODO
'It is not automatically installed.')
# check for pykrige
try:
import pykrige
except ImportError:
if not util.find_spec('pykrige'):
warnings.warn('You need to install pykrige manually if you want to interpolate tie point grids produced by AROSICS '
'(see https://github.com/bsmurphy/PyKrige). It is not automatically installed.') # TODO
'(see https://github.com/bsmurphy/PyKrige). It is not automatically installed.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment