esa-snappy 1.0.9__cp39-none-any.whl → 1.1.0__cp39-none-any.whl
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.
- esa_snappy/snapista/graph.py +7 -38
- esa_snappy/snappyutil.py +3 -10
- {esa_snappy-1.0.9.dist-info → esa_snappy-1.1.0.dist-info}/METADATA +2 -1
- {esa_snappy-1.0.9.dist-info → esa_snappy-1.1.0.dist-info}/RECORD +7 -7
- {esa_snappy-1.0.9.dist-info → esa_snappy-1.1.0.dist-info}/WHEEL +1 -1
- {esa_snappy-1.0.9.dist-info → esa_snappy-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {esa_snappy-1.0.9.dist-info → esa_snappy-1.1.0.dist-info}/top_level.txt +0 -0
esa_snappy/snapista/graph.py
CHANGED
|
@@ -2,8 +2,6 @@ import os
|
|
|
2
2
|
import subprocess
|
|
3
3
|
import tempfile
|
|
4
4
|
import platform
|
|
5
|
-
import sysconfig
|
|
6
|
-
import configparser
|
|
7
5
|
import lxml.etree as etree
|
|
8
6
|
from esa_snappy import GPF
|
|
9
7
|
from xml.sax.saxutils import unescape
|
|
@@ -54,27 +52,8 @@ class Graph:
|
|
|
54
52
|
|
|
55
53
|
return "Graph(wdir='{}')".format(self.wdir)
|
|
56
54
|
|
|
57
|
-
|
|
58
55
|
@staticmethod
|
|
59
56
|
def get_gpt_cmd():
|
|
60
|
-
"""
|
|
61
|
-
Retrieves the path of the SNAP gpt command.
|
|
62
|
-
|
|
63
|
-
:return: SNAP gpt path
|
|
64
|
-
"""
|
|
65
|
-
def get_snap_bin_path():
|
|
66
|
-
"""
|
|
67
|
-
Retrieves the SNAP bin path from esa_snappy.ini.
|
|
68
|
-
|
|
69
|
-
:return: SNAP bin path
|
|
70
|
-
"""
|
|
71
|
-
esa_snappy_package_path = sysconfig.get_paths()['purelib'] + os.sep + "esa_snappy"
|
|
72
|
-
esa_snappy_ini_file_path = esa_snappy_package_path + os.sep + "esa_snappy.ini"
|
|
73
|
-
esa_snappy_config = configparser.ConfigParser()
|
|
74
|
-
esa_snappy_config.read(esa_snappy_ini_file_path)
|
|
75
|
-
|
|
76
|
-
return esa_snappy_config['DEFAULT']['snap_home'] + os.sep + "bin"
|
|
77
|
-
|
|
78
57
|
|
|
79
58
|
gpt_cmd = None
|
|
80
59
|
|
|
@@ -85,23 +64,13 @@ class Graph:
|
|
|
85
64
|
path_split_char = ":"
|
|
86
65
|
gpt_executable = "gpt"
|
|
87
66
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# gpt_cmd = os.path.join(p, gpt_executable)
|
|
96
|
-
#
|
|
97
|
-
# break
|
|
98
|
-
|
|
99
|
-
# better get it directly from esa_snappy.ini
|
|
100
|
-
if gpt_cmd == None:
|
|
101
|
-
# get SNAP bin path from esa_snappy.ini and try again:
|
|
102
|
-
snap_bin_path = get_snap_bin_path()
|
|
103
|
-
os.environ['PATH'] = snap_bin_path + path_split_char + os.environ['PATH']
|
|
104
|
-
gpt_cmd = os.path.join(snap_bin_path, gpt_executable)
|
|
67
|
+
for p in os.getenv("PATH").split(path_split_char):
|
|
68
|
+
|
|
69
|
+
if os.path.exists(os.path.join(p, gpt_executable)):
|
|
70
|
+
|
|
71
|
+
gpt_cmd = os.path.join(p, gpt_executable)
|
|
72
|
+
|
|
73
|
+
break
|
|
105
74
|
|
|
106
75
|
return gpt_cmd
|
|
107
76
|
|
esa_snappy/snappyutil.py
CHANGED
|
@@ -35,17 +35,10 @@ def _find_file(dir_path, jpy_whl_pat):
|
|
|
35
35
|
if 'linux' in jpy_whl_pat and 'aarch64' in jpy_whl_pat and 'linux' in jpy_whl_filename:
|
|
36
36
|
if 'aarch64' in jpy_whl_filename:
|
|
37
37
|
return _get_file_in_dir(dir_path, jpy_whl_filename)
|
|
38
|
-
# Macos
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if 'macosx' in jpy_whl_filename and 'universal2' in jpy_whl_filename:
|
|
38
|
+
# Macos
|
|
39
|
+
if 'macosx' in jpy_whl_pat and 'arm64' in jpy_whl_pat and 'macosx' in jpy_whl_filename:
|
|
40
|
+
if 'x86_64' in jpy_whl_filename or 'universal2' in jpy_whl_filename:
|
|
42
41
|
return _get_file_in_dir(dir_path, jpy_whl_filename)
|
|
43
|
-
# Macos X86 (Intel, version 10.4.7-)
|
|
44
|
-
# whl pat: e.g. macosx-10.9-x86_64; wheel filename: jpy-...-macosx_..._universal2.whl
|
|
45
|
-
if 'macosx' in jpy_whl_pat and 'x86_64' in jpy_whl_pat:
|
|
46
|
-
if 'macosx' in jpy_whl_filename and 'universal2' in jpy_whl_filename:
|
|
47
|
-
return _get_file_in_dir(dir_path, jpy_whl_filename)
|
|
48
|
-
|
|
49
42
|
return None
|
|
50
43
|
|
|
51
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: esa_snappy
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: The Python part of the SNAP Java-Python bridge.
|
|
5
5
|
Author: Olaf Danne, Norman Fomferra (Brockmann Consult GmbH)
|
|
6
6
|
License: MIT
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
19
|
Classifier: Topic :: Software Development
|
|
19
20
|
Classifier: Topic :: Scientific/Engineering
|
|
20
21
|
Classifier: Typing :: Typed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
esa_snappy/__init__.py,sha256=3CiPjht9jUE9ID15hfTsYkHo5_V9RTfV6vLrMFmCGWU,15253
|
|
2
|
-
esa_snappy/snappyutil.py,sha256=
|
|
2
|
+
esa_snappy/snappyutil.py,sha256=gPA7kCDhNCT3-feZzSKzpeJaY9KFgAUquVv6iyPtVvU,13577
|
|
3
3
|
esa_snappy/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
esa_snappy/examples/snappy_bmaths.py,sha256=kKmdFpLoLdYi0vYgdtQmegr_jBQpGeEUVr8jIo51q-4,1854
|
|
5
5
|
esa_snappy/examples/snappy_flh.py,sha256=3QgEIE-qUYwX8MGPWmGgFEXTJ0sY7tNwUK46GpvkIiU,1610
|
|
@@ -14,7 +14,7 @@ esa_snappy/lib/jpy-1.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.
|
|
|
14
14
|
esa_snappy/lib/jpy-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl,sha256=nPANBkNHRfyfJayf7RHQpdJDxrlgbAWNq_URmffR520,391227
|
|
15
15
|
esa_snappy/lib/jpy-1.0.0-cp39-cp39-win_amd64.whl,sha256=R4d5H1Nq2CDVwiev07PLuQgIRD5CEAB0smoLq9_V14w,124091
|
|
16
16
|
esa_snappy/snapista/__init__.py,sha256=UoFdyRO7zKbvdzCK9PeRb2EgChNPso3DbwypPztG0cw,230
|
|
17
|
-
esa_snappy/snapista/graph.py,sha256=
|
|
17
|
+
esa_snappy/snapista/graph.py,sha256=YFbC5fgF53NDexKpirVNSjiJsKAx_tIn3y1BqjpRdTo,15202
|
|
18
18
|
esa_snappy/snapista/graph_io.py,sha256=tk5lUG9Wg6PtGeJTO7fi8Wvm-kagbvAdlowTdAKWSn4,377
|
|
19
19
|
esa_snappy/snapista/operator.py,sha256=hgWbu-fAc-DVcYD7TnWwlWpLsp_4pnKU92SzNqVS1Dw,3356
|
|
20
20
|
esa_snappy/snapista/operatorparams.py,sha256=_tBMtg5ndV1VeuuZ6Iv103Gcsh_hi_yOmwXhovK-YHY,1381
|
|
@@ -108,8 +108,8 @@ esa_snappy/tests/__init__.py,sha256=F4oR5lxuvk4xsRSJ65fkZPrsrfPD8fNVbhSuAyHox7Q,
|
|
|
108
108
|
esa_snappy/tests/test_snappy_mem.py,sha256=5UeN4A5-kgV534eRforf6OqO0UbqcTbREeRVvUqeU9A,971
|
|
109
109
|
esa_snappy/tests/test_snappy_perf.py,sha256=W1nlzDzvmbhDNc4ma4u5m4qRjEjLIU-gCbKzLkHdIwM,1710
|
|
110
110
|
esa_snappy/tests/test_snappy_product.py,sha256=zCPMOTQ3zoRN0OLLMy7NsHd7YuZnsa2loYGcD9Ehf3A,3564
|
|
111
|
-
esa_snappy-1.0.
|
|
112
|
-
esa_snappy-1.0.
|
|
113
|
-
esa_snappy-1.0.
|
|
114
|
-
esa_snappy-1.0.
|
|
115
|
-
esa_snappy-1.0.
|
|
111
|
+
esa_snappy-1.1.0.dist-info/licenses/LICENSE,sha256=WhZlPzkdURd2lAAvpQrjy1tIXgkmxrKFS45OPs2PxPM,1105
|
|
112
|
+
esa_snappy-1.1.0.dist-info/METADATA,sha256=AMBLiATmd817J96BwL7eJHg_akoaZ0yYjetxiLM7qRw,2545
|
|
113
|
+
esa_snappy-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
114
|
+
esa_snappy-1.1.0.dist-info/top_level.txt,sha256=Rp5J9LQi3dYksBH5aChaVvqyd0FecQA5byHcDTal2vk,11
|
|
115
|
+
esa_snappy-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|