# L2A_AtmCorr.so dela problemy, chce to jeste vyladit

easyblock = "PythonPackage"

name = 'Sen2Cor'
version = '2.3.1'

homepage = 'http://step.esa.int/main/third-party-plugins-2/sen2cor/'
description = """Sen2Cor is a processor for Sentinel-2 Level 2A product generation and formatting;
it performs the atmospheric-, terrain and cirrus correction of Top-Of- Atmosphere Level 1C input data.
Sen2Cor creates Bottom-Of-Atmosphere, optionally terrain- and cirrus corrected reflectance images;
additional, Aerosol Optical Thickness-, Water Vapor-, Scene Classification Maps and Quality Indicators
for cloud and snow probabilities. Its output product format is equivalent to the Level 1C User Product:
JPEG 2000 images, three different resolutions, 60, 20 and 10 m."""

toolchain = {'name': 'system', 'version': ''}

source_urls = ['http://step.esa.int/thirdparties/sen2cor/%(version)s/']
sources = ['%(namelower)s-%(version)s.tar.gz']

python = "Python"
python_version = "2.7.13"
versionsuffix = '-%s-%s' % (python, python_version)

patches = ['%(name)s-%(version)s-Python-2.7.13.patch']

dependencies = [
    (python, python_version),
    ('GDAL', '2.1.3', '-%s-%s' % (python, python_version)),
]

sanity_check_paths = {
    'files': [
        'bin/L2A_Process',
        'bin/L2A_Process-02.03.01',
        'bin/L2A_Process-2.3.1',
        'lib/python2.7/site-packages/sen2cor-2.3.1-py2.7.egg/sen2cor/L2A_AtmCorr.so'],
    'dirs': ['lib']}

moduleclass = 'phys'
