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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pluck-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Pluck any git repo from any forge — auto-detect, auto-install, done!
5
5
  Author: pluck contributors
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pluck-cli"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "Pluck any git repo from any forge — auto-detect, auto-install, done!"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -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.0"
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(repo_path)], check=True)
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
- installed_path = install_func(repo_path, install_dir)
771
-
772
- # Clean up temp directory
773
- shutil.rmtree(temp_dir)
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
- if old_path.exists() and old_path.resolve() not in SHARED_PATHS:
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
- if install_path.resolve() in SHARED_PATHS or install_path.resolve() == Path.home():
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pluck-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Pluck any git repo from any forge — auto-detect, auto-install, done!
5
5
  Author: pluck contributors
6
6
  License: MIT
File without changes
File without changes
File without changes