rok4 2.2.0__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rok4-2.2.0 → rok4-2.2.3}/PKG-INFO +1 -1
- {rok4-2.2.0 → rok4-2.2.3}/pyproject.toml +1 -1
- rok4-2.2.3/src/rok4/__init__.py +1 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/storage.py +14 -4
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/PKG-INFO +1 -1
- rok4-2.2.0/src/rok4/__init__.py +0 -1
- {rok4-2.2.0 → rok4-2.2.3}/LICENSE.txt +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/README.md +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/README.pypi.md +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/setup.cfg +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/setup.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/enums.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/exceptions.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/layer.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/pyramid.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/raster.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/style.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/tile_matrix_set.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/utils.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4/vector.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/SOURCES.txt +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/dependency_links.txt +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/requires.txt +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/top_level.txt +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_layer.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_pyramid.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_raster.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_storage.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_style.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_tile_matrix_set.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_utils.py +0 -0
- {rok4-2.2.0 → rok4-2.2.3}/tests/test_vector.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.3"
|
|
@@ -52,9 +52,21 @@ from typing import Dict, Tuple, Union
|
|
|
52
52
|
import boto3
|
|
53
53
|
import botocore.exceptions
|
|
54
54
|
import requests
|
|
55
|
-
from osgeo import gdal
|
|
56
55
|
|
|
57
56
|
# conditional import
|
|
57
|
+
|
|
58
|
+
try:
|
|
59
|
+
from osgeo import gdal
|
|
60
|
+
|
|
61
|
+
# Enable GDAL/OGR exceptions
|
|
62
|
+
gdal.UseExceptions()
|
|
63
|
+
|
|
64
|
+
GDAL_AVAILABLE: bool = True
|
|
65
|
+
except ImportError:
|
|
66
|
+
GDAL_AVAILABLE: bool = False
|
|
67
|
+
gdal = None
|
|
68
|
+
|
|
69
|
+
|
|
58
70
|
try:
|
|
59
71
|
import rados
|
|
60
72
|
|
|
@@ -69,8 +81,6 @@ from rok4.exceptions import MissingEnvironmentError, StorageError
|
|
|
69
81
|
|
|
70
82
|
# -- GLOBALS --
|
|
71
83
|
|
|
72
|
-
# Enable GDAL/OGR exceptions
|
|
73
|
-
gdal.UseExceptions()
|
|
74
84
|
|
|
75
85
|
__CEPH_CLIENT = None
|
|
76
86
|
__CEPH_IOCTXS = {}
|
|
@@ -1071,7 +1081,7 @@ def get_osgeo_path(path: str) -> str:
|
|
|
1071
1081
|
|
|
1072
1082
|
storage_type, unprefixed_path, tray_name, base_name = get_infos_from_path(path)
|
|
1073
1083
|
|
|
1074
|
-
if storage_type == StorageType.S3:
|
|
1084
|
+
if storage_type == StorageType.S3 and GDAL_AVAILABLE:
|
|
1075
1085
|
s3_client, bucket_name = __get_s3_client(tray_name)
|
|
1076
1086
|
|
|
1077
1087
|
gdal.SetConfigOption("AWS_SECRET_ACCESS_KEY", s3_client["secret_key"])
|
rok4-2.2.0/src/rok4/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|