pluck-cli 0.3.0__tar.gz → 0.3.2__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.
- {pluck_cli-0.3.0/src/pluck_cli.egg-info → pluck_cli-0.3.2}/PKG-INFO +1 -1
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/pyproject.toml +1 -1
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/src/gh_install.py +18 -9
- {pluck_cli-0.3.0 → pluck_cli-0.3.2/src/pluck_cli.egg-info}/PKG-INFO +1 -1
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/LICENSE +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/README.md +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/setup.cfg +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/src/pluck_cli.egg-info/SOURCES.txt +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/src/pluck_cli.egg-info/dependency_links.txt +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/src/pluck_cli.egg-info/entry_points.txt +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/src/pluck_cli.egg-info/top_level.txt +0 -0
- {pluck_cli-0.3.0 → pluck_cli-0.3.2}/tests/test_gh_install.py +0 -0
|
@@ -19,7 +19,7 @@ import urllib.request
|
|
|
19
19
|
from datetime import datetime
|
|
20
20
|
from pathlib import Path
|
|
21
21
|
|
|
22
|
-
__version__ = "0.3.
|
|
22
|
+
__version__ = "0.3.2"
|
|
23
23
|
|
|
24
24
|
# Configuration
|
|
25
25
|
DEFAULT_INSTALL_DIR_MACOS = Path.home() / "Applications"
|
|
@@ -470,12 +470,15 @@ def install_python(repo_path, install_dir):
|
|
|
470
470
|
|
|
471
471
|
try:
|
|
472
472
|
app_dir = install_dir / repo_path.name
|
|
473
|
+
ignore = shutil.ignore_patterns(".git", "__pycache__", ".venv", "venv")
|
|
474
|
+
shutil.copytree(repo_path, app_dir, dirs_exist_ok=True, ignore=ignore)
|
|
475
|
+
|
|
473
476
|
venv_path = app_dir / ".venv"
|
|
474
477
|
venv_path.parent.mkdir(parents=True, exist_ok=True)
|
|
475
478
|
subprocess.run([sys.executable, "-m", "venv", str(venv_path)], check=True)
|
|
476
479
|
|
|
477
480
|
pip_path = venv_path / "bin" / "pip"
|
|
478
|
-
subprocess.run([str(pip_path), "install", "-e", str(
|
|
481
|
+
subprocess.run([str(pip_path), "install", "-e", str(app_dir)], check=True)
|
|
479
482
|
|
|
480
483
|
print_success(f"Installed to {app_dir}")
|
|
481
484
|
|
|
@@ -767,10 +770,11 @@ def download_and_install(
|
|
|
767
770
|
}
|
|
768
771
|
|
|
769
772
|
install_func = install_funcs.get(install_method, install_binary)
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
773
|
+
try:
|
|
774
|
+
installed_path = install_func(repo_path, install_dir)
|
|
775
|
+
finally:
|
|
776
|
+
# Clean up temp directory
|
|
777
|
+
shutil.rmtree(temp_dir, ignore_errors=True)
|
|
774
778
|
|
|
775
779
|
# Register the installation
|
|
776
780
|
if installed_path:
|
|
@@ -824,7 +828,12 @@ def update_app(
|
|
|
824
828
|
return True
|
|
825
829
|
|
|
826
830
|
# Remove old installation
|
|
827
|
-
|
|
831
|
+
resolved_shared_paths = {p.resolve() for p in SHARED_PATHS}
|
|
832
|
+
if (
|
|
833
|
+
old_path.exists()
|
|
834
|
+
and old_path.resolve() not in resolved_shared_paths
|
|
835
|
+
and old_path.resolve() != Path.home().resolve()
|
|
836
|
+
):
|
|
828
837
|
if old_path.is_file():
|
|
829
838
|
old_path.unlink()
|
|
830
839
|
else:
|
|
@@ -923,7 +932,6 @@ def doctor(json_output=False):
|
|
|
923
932
|
if not found and exe == "python3":
|
|
924
933
|
found = bool(shutil.which("python"))
|
|
925
934
|
results.append({"tool": tool, "required": req, "found": found, "purpose": purpose})
|
|
926
|
-
results.append({"tool": tool, "required": req, "found": found, "purpose": purpose})
|
|
927
935
|
if not found and req == "Required":
|
|
928
936
|
all_ok = False
|
|
929
937
|
|
|
@@ -1360,7 +1368,8 @@ def uninstall_app(repo_name, force=False):
|
|
|
1360
1368
|
|
|
1361
1369
|
# Remove installed files — but never delete shared system directories
|
|
1362
1370
|
install_path = Path(app_info["path"])
|
|
1363
|
-
|
|
1371
|
+
resolved_shared_paths = {p.resolve() for p in SHARED_PATHS}
|
|
1372
|
+
if install_path.resolve() in resolved_shared_paths or install_path.resolve() == Path.home().resolve():
|
|
1364
1373
|
print_error(f"Refusing to uninstall: {install_path} is a shared directory")
|
|
1365
1374
|
print_warning("Remove files from this directory manually instead")
|
|
1366
1375
|
return False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|