Coverage for enpt_enmapboxapp/__init__.py: 88%

8 statements  

« prev     ^ index     » next       coverage.py v7.4.1, created at 2024-03-05 19:40 +0000

1# -*- coding: utf-8 -*- 

2 

3# enpt_enmapboxapp, A QGIS EnMAPBox plugin providing a GUI for the EnMAP processing tools (EnPT) 

4# 

5# Copyright (C) 2018-2024 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de) 

6# 

7# This software was developed within the context of the EnMAP project supported 

8# by the DLR Space Administration with funds of the German Federal Ministry of 

9# Economic Affairs and Energy (on the basis of a decision by the German Bundestag: 

10# 50 EE 1529) and contributions from DLR, GFZ and OHB System AG. 

11# 

12# This program is free software: you can redistribute it and/or modify it under 

13# the terms of the GNU Lesser General Public License as published by the Free 

14# Software Foundation, either version 3 of the License, or (at your option) any 

15# later version. 

16# 

17# This program is distributed in the hope that it will be useful, but WITHOUT 

18# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 

19# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 

20# details. 

21# 

22# You should have received a copy of the GNU Lesser General Public License along 

23# with this program. If not, see <https://www.gnu.org/licenses/>. 

24 

25"""Top-level package for enpt_enmapboxapp.""" 

26 

27import os as __os 

28 

29from .version import __version__, __versionalias__ # noqa (E402 + F401) 

30# NOTE: importing the main classes here would break the conda-forge builds as they don't package qgis and enmapbox 

31 

32 

33__author__ = """Daniel Scheffler""" 

34__email__ = 'danschef@gfz-potsdam.de' 

35__all__ = ['__version__', 

36 '__versionalias__', 

37 '__author__', 

38 '__email__' 

39 ] 

40 

41 

42# $PROJ_LIB was renamed to $PROJ_DATA in proj=9.1.1, which leads to issues with fiona>=1.8.20,<1.9 

43# https://github.com/conda-forge/pyproj-feedstock/issues/130 

44# -> fix it by setting PROJ_DATA 

45if 'GDAL_DATA' in __os.environ and 'PROJ_DATA' not in __os.environ and 'PROJ_LIB' not in __os.environ: 

46 __os.environ['PROJ_DATA'] = __os.path.join(__os.path.dirname(__os.environ['GDAL_DATA']), 'proj')