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

Simplified dependency checks.

parent 4abdb080
Pipeline #1309 passed with stages
in 12 minutes and 27 seconds
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"""Top-level package for arosics.""" """Top-level package for arosics."""
import warnings import warnings
from importlib import util
from arosics.CoReg import COREG from arosics.CoReg import COREG
from arosics.CoReg_local import COREG_LOCAL from arosics.CoReg_local import COREG_LOCAL
...@@ -11,8 +12,8 @@ from arosics.Tie_Point_Grid import Tie_Point_Grid ...@@ -11,8 +12,8 @@ from arosics.Tie_Point_Grid import Tie_Point_Grid
__author__ = """Daniel Scheffler""" __author__ = """Daniel Scheffler"""
__email__ = 'daniel.scheffler@gfz-potsdam.de' __email__ = 'daniel.scheffler@gfz-potsdam.de'
__version__ = '0.6.0' __version__ = '0.6.1'
__versionalias__ = '2017-10-10_01' __versionalias__ = '2017-10-10_02'
__all__ = ['COREG', __all__ = ['COREG',
'COREG_LOCAL', 'COREG_LOCAL',
'DESHIFTER', 'DESHIFTER',
...@@ -20,10 +21,7 @@ __all__ = ['COREG', ...@@ -20,10 +21,7 @@ __all__ = ['COREG',
# check optional dependencies # check optional dependencies
try: if not util.find_spec('pyfftw'):
import pyfftw
except ImportError:
pyfftw = None
warnings.warn('PYFFTW library is missing. However, coregistration works. But in some cases it can be much slower.') 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 @@ ...@@ -5,6 +5,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
import warnings import warnings
from importlib import util
with open('README.rst') as readme_file: with open('README.rst') as readme_file:
readme = readme_file.read() readme = readme_file.read()
...@@ -27,7 +28,7 @@ test_requirements = requirements + ['coverage', 'nose', 'nose-htmloutput', 'redn ...@@ -27,7 +28,7 @@ test_requirements = requirements + ['coverage', 'nose', 'nose-htmloutput', 'redn
setup( setup(
name='arosics', 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", description="An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data",
long_description=readme + '\n\n' + history, long_description=readme + '\n\n' + history,
author="Daniel Scheffler", author="Daniel Scheffler",
...@@ -59,23 +60,17 @@ setup( ...@@ -59,23 +60,17 @@ setup(
) )
# check for pyffw # check for pyfftw
try: if not util.find_spec('pyfftw'):
import pyfftw
except ImportError:
warnings.warn('You need to install pyfftw manually (see https://pypi.python.org/pypi/pyFFTW) for speeding up ' 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 # check for basemap
try: if not util.find_spec('mpl_toolkits.basemap'):
from mpl_toolkits.basemap import Basemap
except ImportError:
warnings.warn('You need to install basemap manually if you want to plot maps (see www./matplotlib.org/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 # check for pykrige
try: if not util.find_spec('pykrige'):
import pykrige
except ImportError:
warnings.warn('You need to install pykrige manually if you want to interpolate tie point grids produced by AROSICS ' 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.')
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