PyGeoFetch 2.0.8__py3-none-any.whl → 2.0.9__py3-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.
pygeofetch/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- PyGeoFetch v2.0.8 — Universal Satellite Data Pipeline.
2
+ PyGeoFetch v2.0.9 — Universal Satellite Data Pipeline.
3
3
 
4
4
  Unified access to 22+ satellite data providers with a consistent
5
5
  Python API and CLI. Supports authentication management, federated search,
@@ -30,7 +30,7 @@ CLI::
30
30
  pygeofetch doctor
31
31
  """
32
32
 
33
- __version__ = "2.0.8"
33
+ __version__ = "2.0.9"
34
34
  __author__ = "PyGeoFetch Contributors"
35
35
  __license__ = "MIT"
36
36
 
pygeofetch/cli/main.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- PyGeoFetch CLI v2.0.8 main entry point.
2
+ PyGeoFetch CLI v2.0.9 main entry point.
3
3
 
4
4
  Full command reference:
5
5
  pygeofetch auth — credential management
@@ -71,7 +71,7 @@ def cli(
71
71
  ) -> None:
72
72
  """
73
73
  \b
74
- PyGeoFetch v2.0.8 — Universal Satellite Data Pipeline
74
+ PyGeoFetch v2.0.9 — Universal Satellite Data Pipeline
75
75
  ===========================================================
76
76
  Unified access to 22+ satellite data providers.
77
77
 
@@ -523,12 +523,14 @@ class PhaseUnwrapper:
523
523
 
524
524
  def _ensure_msvc_runtime(self, bin_dir: Path):
525
525
  """
526
- Fixes the 0xC0000135 error by finding the required MSVC DLLs
527
- already present in the user's Python environment (e.g., from
528
- numpy/scipy wheels) and copying them next to snaphu.exe.
526
+ Fixes the 0xC0000135 (STATUS_DLL_NOT_FOUND) error by downloading
527
+ the required MSVC DLLs directly from NuGet (VCRuntime.140 package).
528
+ This requires ZERO admin rights and ZERO manual installation.
529
529
  """
530
- import sys
531
530
  import shutil
531
+ import zipfile
532
+ import io
533
+ import urllib.request
532
534
 
533
535
  required_dlls = ["vcruntime140.dll", "msvcp140.dll"]
534
536
  missing = [dll for dll in required_dlls if not (bin_dir / dll).exists()]
@@ -536,45 +538,41 @@ class PhaseUnwrapper:
536
538
  if not missing:
537
539
  return
538
540
 
539
- logger.info(f"SNAPHU requires {missing}. Searching local Python environment...")
541
+ logger.info(f"SNAPHU requires {missing}. Downloading directly from NuGet (no admin required)...")
540
542
 
541
- found = {}
542
- for path in sys.path:
543
- if not path or not Path(path).exists():
544
- continue
545
- try:
546
- p = Path(path)
547
- for dll in missing:
548
- if dll in found:
549
- continue
550
- # Check .libs folders first (where numpy/scipy put them)
551
- for libs_dir in p.glob("*.libs"):
552
- target = libs_dir / dll
553
- if target.exists():
554
- found[dll] = target
555
- break
556
- if dll in found:
557
- continue
558
- # Fallback to full rglob if not in .libs
559
- for target in p.rglob(dll):
560
- found[dll] = target
561
- break
562
- except Exception:
563
- continue
543
+ # NuGet packages are just zip files. We download the VCRuntime.140 package
544
+ # which contains the exact DLLs we need for x64 Windows.
545
+ nuget_url = "https://www.nuget.org/api/v2/package/VCRuntime.140"
546
+
547
+ try:
548
+ req = urllib.request.Request(nuget_url, headers={'User-Agent': 'PyGeoFetch'})
549
+ with urllib.request.urlopen(req, timeout=30) as response:
550
+ nupkg_data = response.read()
564
551
 
565
- if len(found) == len(missing):
566
- logger.info("Found MSVC DLLs in local Python environment. Copying to SNAPHU bin...")
567
- for dll, src in found.items():
568
- shutil.copy2(src, bin_dir / dll)
569
- return
570
-
571
- raise RuntimeError(
572
- f"SNAPHU requires the Microsoft Visual C++ Redistributable DLLs ({missing}), "
573
- "but they could not be found in your Python environment.\n"
574
- "Please install the Microsoft Visual C++ Redistributable manually from:\n"
575
- "https://aka.ms/vs/17/release/vc_redist.x64.exe\n"
576
- "Then restart your Jupyter kernel and try again."
577
- )
552
+ extracted = 0
553
+ with zipfile.ZipFile(io.BytesIO(nupkg_data)) as zf:
554
+ for name in zf.namelist():
555
+ # We only want the 64-bit native DLLs
556
+ if "win-x64/native/" in name and name.lower().endswith(".dll"):
557
+ dll_name = Path(name).name
558
+ if dll_name.lower() in [m.lower() for m in missing]:
559
+ with zf.open(name) as src, open(bin_dir / dll_name, "wb") as dst:
560
+ shutil.copyfileobj(src, dst)
561
+ extracted += 1
562
+
563
+ if extracted == len(missing):
564
+ logger.info(f"Successfully extracted {extracted} MSVC DLLs to {bin_dir}. Retrying SNAPHU...")
565
+ return
566
+ else:
567
+ raise RuntimeError(f"Could not find all required DLLs in the NuGet package. Found {extracted}/{len(missing)}")
568
+
569
+ except Exception as e:
570
+ raise RuntimeError(
571
+ f"Failed to download/extract MSVC runtime DLLs from NuGet: {e}\n"
572
+ "As a last resort, please install the Microsoft Visual C++ Redistributable manually from:\n"
573
+ "https://aka.ms/vs/17/release/vc_redist.x64.exe\n"
574
+ "Then restart your Jupyter kernel."
575
+ )
578
576
 
579
577
  def unwrap(
580
578
  self,
pygeofetch/meta.yaml CHANGED
@@ -1,4 +1,4 @@
1
- {% set version = "2.0.8" %}
1
+ {% set version = "2.0.9" %}
2
2
 
3
3
  package:
4
4
  name: pygeofetch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeofetch
3
- Version: 2.0.8
3
+ Version: 2.0.9
4
4
  Summary: Universal satellite data pipeline + geospatial processing platform
5
5
  Author-email: Samuel Appiah Kubi <appiahkubis14@gmail.com>
6
6
  License: MIT License
@@ -1,11 +1,11 @@
1
- pygeofetch/__init__.py,sha256=HFS6RVpvpVEADDOM4bbQMzCMlaqpw57EU9RGwNO8Ojk,1990
2
- pygeofetch/meta.yaml,sha256=rlTZnPfmVCnO9GcrjysJm4kE9Ycjmu2F7APKTKzSIt0,1280
1
+ pygeofetch/__init__.py,sha256=RDB0ME4m2ADK1BxKVEQB93rq-yfN7pF0uHbl4cafsPo,1990
2
+ pygeofetch/meta.yaml,sha256=PVK-tAx2L30LEg6FaU7zNyFtXmnDybAnQ0SZtd81qHg,1280
3
3
  pygeofetch/cli/__init__.py,sha256=QZMIIHEgmjGFieucqq9fZ5uephxP9-jdu1s8Q4qqw8o,30
4
4
  pygeofetch/cli/auth_commands.py,sha256=YqbrN_BYcAYCaUIYLpSJ_VIw35tKFUiD9Kc55SWbDWg,7742
5
5
  pygeofetch/cli/config_commands.py,sha256=1Pps0HLCLPODMlM6SFV8ru3IKCDpexSTz8uKIXvIIF8,3918
6
6
  pygeofetch/cli/download_commands.py,sha256=reQ9vmA50mj1zqechjLHAOe_cjBfa1miqfWa8UiIlxU,11741
7
7
  pygeofetch/cli/index_commands.py,sha256=IoLGrsSU-lTcBitFFsg8EtucqSKZtNL-0ODj_I8Twew,10020
8
- pygeofetch/cli/main.py,sha256=T87K-cExYPBptWnMJ5NQwfPjJfSfem5GyipT-et07FY,30335
8
+ pygeofetch/cli/main.py,sha256=UZVPectgQIF29g30UsyQCEZ_HGYBy47LhAvue9Y7PhA,30335
9
9
  pygeofetch/cli/pipeline_process_commands.py,sha256=OvuouT35zZlrC-7hWAJRfaY_aUNk4ScK0Fia9WVB_Gw,6904
10
10
  pygeofetch/cli/postprocess_commands.py,sha256=kof_f-kjjvYl5eqPqrcNHSOUM_qVkGdSh6-N4vcx2y4,5825
11
11
  pygeofetch/cli/preprocess_commands.py,sha256=cFp1VR03Q1pmCwiBWYmS5lXF3NOnzVAq3XgrZh3rBdU,8696
@@ -39,7 +39,7 @@ pygeofetch/insar/splitspectrum_diagnostic.py,sha256=_IlfBs__BW7Yz2RwdmWxfrOspe67
39
39
  pygeofetch/insar/stack_selection.py,sha256=ebFwO063cCT9kn3zLPlkYu6fpnfx-SRC90Ch18E7qJk,13157
40
40
  pygeofetch/insar/synthetic.py,sha256=FazdaG_u3GR1qk8022T92W2uxDJPg7OJaUSGY0wR0pw,16248
41
41
  pygeofetch/insar/timeseries.py,sha256=EtLJiPySMaUWwyNxI2GyfBdkqB4W-uvL-_E_T_POHz4,32063
42
- pygeofetch/insar/unwrap.py,sha256=bHdcHqWvceUsbZegvUtpGXLY4jvF_lmiHmds7pTT0Vs,30457
42
+ pygeofetch/insar/unwrap.py,sha256=c5viQA3H16r7w7UQNiDY35ht_jx-d9-6Q3j0UgUKEt4,30777
43
43
  pygeofetch/insar/validate.py,sha256=BZaVvaPNllfDzoPwat0vDA4do6H5xh5Ju_g4r5YNogE,10110
44
44
  pygeofetch/insar/visualize.py,sha256=D_KlWkpuOvfjke6ThHcMBkZTRwWn1KdBFNL1TBcy6kI,7543
45
45
  pygeofetch/insar/workflow.py,sha256=8IxGgabdz9fDLoGAVrJRCdw16GP3sSDSoFPXyv1RXcg,11713
@@ -104,9 +104,9 @@ pygeofetch/utils/validators.py,sha256=f-k3mGFP4byjimyDymhPEdsz5I16jZacx1HSnwrARj
104
104
  pygeofetch/viz/__init__.py,sha256=xf2C9IL4n3bv3oxk8RYkogq7nkuNyt18V-urAoXWRQY,449
105
105
  pygeofetch/viz/map.py,sha256=vYO99NvTumCAVXVtXcEzMx_cpmH-FvSVNWl8X0PNSgE,15494
106
106
  pygeofetch/viz/plot.py,sha256=I16rdOWb80gcjYDsDvTMzuyek7QHgUNOQxY2RejBAPs,53675
107
- pygeofetch-2.0.8.dist-info/licenses/LICENSE,sha256=zavMyhODD6NvZTmmKFEtATrngwY4CU_NEtY7lhjxGnI,1075
108
- pygeofetch-2.0.8.dist-info/METADATA,sha256=N8qOTU2GQ_Emwaqh8tDUZ_ZGJU8BU7vZdnAcWil8-s0,43254
109
- pygeofetch-2.0.8.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
110
- pygeofetch-2.0.8.dist-info/entry_points.txt,sha256=dHiUXLF5xNJ8vgtXZoUQNleEMQUeDPZiKQOE1tW8SDY,55
111
- pygeofetch-2.0.8.dist-info/top_level.txt,sha256=rOmnZargIfNk99fwVOqt6OJyJvpSTBBAYO5HU37yhHk,11
112
- pygeofetch-2.0.8.dist-info/RECORD,,
107
+ pygeofetch-2.0.9.dist-info/licenses/LICENSE,sha256=zavMyhODD6NvZTmmKFEtATrngwY4CU_NEtY7lhjxGnI,1075
108
+ pygeofetch-2.0.9.dist-info/METADATA,sha256=0FB9OccvQb0t7uHgSUxB-DRMGqS9O1W0rHNtwhDTliI,43254
109
+ pygeofetch-2.0.9.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
110
+ pygeofetch-2.0.9.dist-info/entry_points.txt,sha256=dHiUXLF5xNJ8vgtXZoUQNleEMQUeDPZiKQOE1tW8SDY,55
111
+ pygeofetch-2.0.9.dist-info/top_level.txt,sha256=rOmnZargIfNk99fwVOqt6OJyJvpSTBBAYO5HU37yhHk,11
112
+ pygeofetch-2.0.9.dist-info/RECORD,,