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.
Files changed (32) hide show
  1. {rok4-2.2.0 → rok4-2.2.3}/PKG-INFO +1 -1
  2. {rok4-2.2.0 → rok4-2.2.3}/pyproject.toml +1 -1
  3. rok4-2.2.3/src/rok4/__init__.py +1 -0
  4. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/storage.py +14 -4
  5. {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/PKG-INFO +1 -1
  6. rok4-2.2.0/src/rok4/__init__.py +0 -1
  7. {rok4-2.2.0 → rok4-2.2.3}/LICENSE.txt +0 -0
  8. {rok4-2.2.0 → rok4-2.2.3}/README.md +0 -0
  9. {rok4-2.2.0 → rok4-2.2.3}/README.pypi.md +0 -0
  10. {rok4-2.2.0 → rok4-2.2.3}/setup.cfg +0 -0
  11. {rok4-2.2.0 → rok4-2.2.3}/setup.py +0 -0
  12. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/enums.py +0 -0
  13. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/exceptions.py +0 -0
  14. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/layer.py +0 -0
  15. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/pyramid.py +0 -0
  16. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/raster.py +0 -0
  17. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/style.py +0 -0
  18. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/tile_matrix_set.py +0 -0
  19. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/utils.py +0 -0
  20. {rok4-2.2.0 → rok4-2.2.3}/src/rok4/vector.py +0 -0
  21. {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/SOURCES.txt +0 -0
  22. {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/dependency_links.txt +0 -0
  23. {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/requires.txt +0 -0
  24. {rok4-2.2.0 → rok4-2.2.3}/src/rok4.egg-info/top_level.txt +0 -0
  25. {rok4-2.2.0 → rok4-2.2.3}/tests/test_layer.py +0 -0
  26. {rok4-2.2.0 → rok4-2.2.3}/tests/test_pyramid.py +0 -0
  27. {rok4-2.2.0 → rok4-2.2.3}/tests/test_raster.py +0 -0
  28. {rok4-2.2.0 → rok4-2.2.3}/tests/test_storage.py +0 -0
  29. {rok4-2.2.0 → rok4-2.2.3}/tests/test_style.py +0 -0
  30. {rok4-2.2.0 → rok4-2.2.3}/tests/test_tile_matrix_set.py +0 -0
  31. {rok4-2.2.0 → rok4-2.2.3}/tests/test_utils.py +0 -0
  32. {rok4-2.2.0 → rok4-2.2.3}/tests/test_vector.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rok4
3
- Version: 2.2.0
3
+ Version: 2.2.3
4
4
  Summary: Python core libraries for ROK4 project
5
5
  Author-email: Géoportail IGN Developers <tout_rdev@ign.fr>
6
6
  License:
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
 
3
3
  name = "rok4"
4
- version = "2.2.0"
4
+ version = "2.2.3"
5
5
 
6
6
  description = "Python core libraries for ROK4 project"
7
7
  readme = "README.pypi.md"
@@ -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"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rok4
3
- Version: 2.2.0
3
+ Version: 2.2.3
4
4
  Summary: Python core libraries for ROK4 project
5
5
  Author-email: Géoportail IGN Developers <tout_rdev@ign.fr>
6
6
  License:
@@ -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