pyhabitat 1.0.14__py3-none-any.whl → 1.0.15__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.
Potentially problematic release.
This version of pyhabitat might be problematic. Click here for more details.
- pyhabitat/environment.py +12 -3
- {pyhabitat-1.0.14.dist-info → pyhabitat-1.0.15.dist-info}/METADATA +1 -1
- pyhabitat-1.0.15.dist-info/RECORD +7 -0
- pyhabitat-1.0.14.dist-info/RECORD +0 -7
- {pyhabitat-1.0.14.dist-info → pyhabitat-1.0.15.dist-info}/WHEEL +0 -0
- {pyhabitat-1.0.14.dist-info → pyhabitat-1.0.15.dist-info}/licenses/LICENSE +0 -0
- {pyhabitat-1.0.14.dist-info → pyhabitat-1.0.15.dist-info}/top_level.txt +0 -0
pyhabitat/environment.py
CHANGED
|
@@ -12,8 +12,7 @@ import shutil
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
import subprocess
|
|
14
14
|
import io
|
|
15
|
-
|
|
16
|
-
from pipeline.helpers import check_if_zip
|
|
15
|
+
import zipfile
|
|
17
16
|
|
|
18
17
|
# Global cache for tkinter and matplotlib (mpl) availability
|
|
19
18
|
_TKINTER_AVAILABILITY: bool | None = None
|
|
@@ -277,7 +276,7 @@ def is_pyz(exec_path: Path=None, debug=False) -> bool:
|
|
|
277
276
|
if not str(exec_path).endswith(".pyz"):
|
|
278
277
|
return False
|
|
279
278
|
|
|
280
|
-
if not
|
|
279
|
+
if not _check_if_zip():
|
|
281
280
|
return False
|
|
282
281
|
|
|
283
282
|
def is_windows_portable_executable(exec_path: Path = None, debug=False) -> bool:
|
|
@@ -522,3 +521,13 @@ def _get_pipx_paths():
|
|
|
522
521
|
pipx_venv_base = Path.home() / '.local' / 'share' / 'pipx' / 'venvs'
|
|
523
522
|
|
|
524
523
|
return pipx_bin_path, pipx_venv_base.resolve()
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
def _check_if_zip(file_path: str | Path) -> bool:
|
|
527
|
+
"""Checks if the file at the given path is a valid ZIP archive."""
|
|
528
|
+
try:
|
|
529
|
+
return zipfile.is_zipfile(file_path)
|
|
530
|
+
except Exception:
|
|
531
|
+
# Handle cases where the path might be invalid, or other unexpected errors
|
|
532
|
+
return False
|
|
533
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pyhabitat/__init__.py,sha256=XVMOgp7YPR0xYD1F_4-VEhG4rTwx3ga3CttdRKpkyxA,1115
|
|
2
|
+
pyhabitat/environment.py,sha256=K1It1gvUhYHXixIxHoEMl6grTwZJkGVWbt18_Qeh1qQ,20532
|
|
3
|
+
pyhabitat-1.0.15.dist-info/licenses/LICENSE,sha256=D4fg30ctUGnCJlWu3ONv5-V8JE1v3ctakoJTcVjsJlg,1072
|
|
4
|
+
pyhabitat-1.0.15.dist-info/METADATA,sha256=PrG9ruoa2F0RJzIogXh4GX55PUPWn0resJRITDnsqac,8813
|
|
5
|
+
pyhabitat-1.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
pyhabitat-1.0.15.dist-info/top_level.txt,sha256=zXYK44Qu8EqxUETREvd2diMUaB5JiGRErkwFaoLQnnI,10
|
|
7
|
+
pyhabitat-1.0.15.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pyhabitat/__init__.py,sha256=XVMOgp7YPR0xYD1F_4-VEhG4rTwx3ga3CttdRKpkyxA,1115
|
|
2
|
-
pyhabitat/environment.py,sha256=c_eUqlqiAYGBX2LLCMo3PctOYhwTywOrCBrvjg_rXUs,20248
|
|
3
|
-
pyhabitat-1.0.14.dist-info/licenses/LICENSE,sha256=D4fg30ctUGnCJlWu3ONv5-V8JE1v3ctakoJTcVjsJlg,1072
|
|
4
|
-
pyhabitat-1.0.14.dist-info/METADATA,sha256=2_t5JIthRCcKCg5s4cX-CnAGLzfd36LNNmksec8zrM0,8813
|
|
5
|
-
pyhabitat-1.0.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
pyhabitat-1.0.14.dist-info/top_level.txt,sha256=zXYK44Qu8EqxUETREvd2diMUaB5JiGRErkwFaoLQnnI,10
|
|
7
|
-
pyhabitat-1.0.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|