uv-launch 0.2.2__tar.gz → 0.2.3__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,3 +1,13 @@
1
+ Metadata-Version: 2.3
2
+ Name: uv-launch
3
+ Version: 0.2.3
4
+ Summary: Immediate Python command startup with atomic background updates through uv
5
+ Requires-Dist: packaging>=24
6
+ Requires-Dist: platformdirs>=4.8
7
+ Requires-Python: >=3.11
8
+ Project-URL: Repository, https://github.com/nimashoghi/uv-launch
9
+ Description-Content-Type: text/markdown
10
+
1
11
  # uv-launch
2
12
 
3
13
  Install Python commands that start immediately and update in the background. The foreground shell shim executes an already installed environment. It does not invoke uv or wait for network access.
@@ -13,7 +23,9 @@ uv-launch update my-command
13
23
  uv-launch status my-command
14
24
  ```
15
25
 
16
- `--bin-dir` defaults to `~/.local/bin`. Use a separate directory for evaluation. The installer refuses to overwrite commands it does not own. `UV_LAUNCH_HOME` selects the installation-state directory; its default is `~/.local/share/uv-launch`.
26
+ Directory defaults come from [platformdirs](https://platformdirs.readthedocs.io/en/latest/api.html): `user_bin_path()` for installed commands and `user_data_path("uv-launch", appauthor=False)` for durable installations. On macOS the data directory is `~/Library/Application Support/uv-launch`; on Linux it follows `XDG_DATA_HOME`, normally `~/.local/share/uv-launch`. Both platforms normally install commands in `~/.local/bin`. `--bin-dir` and a nonempty `UV_LAUNCH_HOME` override those defaults. Use a separate directory for evaluation. The installer refuses to overwrite commands it does not own.
27
+
28
+ To adopt the platform directory after upgrading from 0.2.2 or earlier, repeat the original `install` or `install-source` command with its existing requirements and options, without a `UV_LAUNCH_HOME` override. This builds and validates a new installation before replacing its launcher. Keep the old directory while any process uses it; do not move its virtual environments, whose executable paths are absolute. Existing launchers retain their recorded directory until reinstalled. To operate on an old installation directly, set `UV_LAUNCH_HOME` to its recorded root.
17
29
 
18
30
  Each invocation captures the current immutable generation and starts a detached update check. Concurrent checks for the same tool coalesce under a process lock. A check resolves all requested packages together, pinning Git dependencies to concrete revisions. If the resolved installation is unchanged, it keeps the existing environment. Otherwise it creates a new environment at its final path, checks dependencies and loads the Python entrypoint (or verifies ownership of a wheel-provided executable), then atomically switches the generation used by future launches. Virtual environments are never moved after creation, because their scripts contain absolute paths.
19
31
 
@@ -77,7 +89,7 @@ uv-launch install codexr \
77
89
  --with 'codex-monitor @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-monitor' \
78
90
  --with 'codex-recovery @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-recovery' \
79
91
  --with 'codex-accounts @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-accounts' \
80
- --bin-dir ~/.local/share/codexr-evaluation/bin
92
+ --bin-dir ./codexr-evaluation/bin
81
93
  ```
82
94
 
83
95
  Use that isolated command before choosing to replace an existing launcher. Updating the local codexr suite and preparing that exact suite on an SSH host remain separate responsibilities; uv-launch contains no Codex or SSH runtime logic.
@@ -1,12 +1,3 @@
1
- Metadata-Version: 2.3
2
- Name: uv-launch
3
- Version: 0.2.2
4
- Summary: Immediate Python command startup with atomic background updates through uv
5
- Requires-Dist: packaging>=24
6
- Requires-Python: >=3.11
7
- Project-URL: Repository, https://github.com/nimashoghi/uv-launch
8
- Description-Content-Type: text/markdown
9
-
10
1
  # uv-launch
11
2
 
12
3
  Install Python commands that start immediately and update in the background. The foreground shell shim executes an already installed environment. It does not invoke uv or wait for network access.
@@ -22,7 +13,9 @@ uv-launch update my-command
22
13
  uv-launch status my-command
23
14
  ```
24
15
 
25
- `--bin-dir` defaults to `~/.local/bin`. Use a separate directory for evaluation. The installer refuses to overwrite commands it does not own. `UV_LAUNCH_HOME` selects the installation-state directory; its default is `~/.local/share/uv-launch`.
16
+ Directory defaults come from [platformdirs](https://platformdirs.readthedocs.io/en/latest/api.html): `user_bin_path()` for installed commands and `user_data_path("uv-launch", appauthor=False)` for durable installations. On macOS the data directory is `~/Library/Application Support/uv-launch`; on Linux it follows `XDG_DATA_HOME`, normally `~/.local/share/uv-launch`. Both platforms normally install commands in `~/.local/bin`. `--bin-dir` and a nonempty `UV_LAUNCH_HOME` override those defaults. Use a separate directory for evaluation. The installer refuses to overwrite commands it does not own.
17
+
18
+ To adopt the platform directory after upgrading from 0.2.2 or earlier, repeat the original `install` or `install-source` command with its existing requirements and options, without a `UV_LAUNCH_HOME` override. This builds and validates a new installation before replacing its launcher. Keep the old directory while any process uses it; do not move its virtual environments, whose executable paths are absolute. Existing launchers retain their recorded directory until reinstalled. To operate on an old installation directly, set `UV_LAUNCH_HOME` to its recorded root.
26
19
 
27
20
  Each invocation captures the current immutable generation and starts a detached update check. Concurrent checks for the same tool coalesce under a process lock. A check resolves all requested packages together, pinning Git dependencies to concrete revisions. If the resolved installation is unchanged, it keeps the existing environment. Otherwise it creates a new environment at its final path, checks dependencies and loads the Python entrypoint (or verifies ownership of a wheel-provided executable), then atomically switches the generation used by future launches. Virtual environments are never moved after creation, because their scripts contain absolute paths.
28
21
 
@@ -86,7 +79,7 @@ uv-launch install codexr \
86
79
  --with 'codex-monitor @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-monitor' \
87
80
  --with 'codex-recovery @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-recovery' \
88
81
  --with 'codex-accounts @ git+https://github.com/nimashoghi/codex-router.git@main#subdirectory=packages/codex-accounts' \
89
- --bin-dir ~/.local/share/codexr-evaluation/bin
82
+ --bin-dir ./codexr-evaluation/bin
90
83
  ```
91
84
 
92
85
  Use that isolated command before choosing to replace an existing launcher. Updating the local codexr suite and preparing that exact suite on an SSH host remain separate responsibilities; uv-launch contains no Codex or SSH runtime logic.
@@ -1,10 +1,13 @@
1
1
  [project]
2
2
  name = "uv-launch"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "Immediate Python command startup with atomic background updates through uv"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
7
- dependencies = ["packaging>=24"]
7
+ dependencies = [
8
+ "packaging>=24",
9
+ "platformdirs>=4.8",
10
+ ]
8
11
 
9
12
  [project.urls]
10
13
  Repository = "https://github.com/nimashoghi/uv-launch"
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "uv-launch"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "Immediate Python command startup with atomic background updates through uv"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
7
- dependencies = ["packaging>=24"]
7
+ dependencies = ["packaging>=24", "platformdirs>=4.8"]
8
8
 
9
9
  [project.urls]
10
10
  Repository = "https://github.com/nimashoghi/uv-launch"
@@ -21,6 +21,8 @@ from contextlib import contextmanager
21
21
  from dataclasses import asdict, dataclass
22
22
  from pathlib import Path
23
23
 
24
+ from platformdirs import user_bin_path, user_data_path
25
+
24
26
  LOGGER = logging.getLogger(__name__)
25
27
 
26
28
 
@@ -53,7 +55,9 @@ def _run_checked(arguments: list[str], **kwargs) -> None:
53
55
 
54
56
  def state_root() -> Path:
55
57
  """Return durable installation state, independently of any current project."""
56
- return Path(os.environ.get("UV_LAUNCH_HOME", "~/.local/share/uv-launch")).expanduser().resolve()
58
+ if override := os.environ.get("UV_LAUNCH_HOME"):
59
+ return Path(override).expanduser().resolve()
60
+ return user_data_path("uv-launch", appauthor=False).resolve()
57
61
 
58
62
 
59
63
  def tool_directory(name: str) -> Path:
@@ -376,7 +380,7 @@ def main(argv: list[str] | None = None) -> int:
376
380
  "--entrypoint", help="installed console script, defaults to command name"
377
381
  )
378
382
  installing.add_argument("--python", default="3.13", help="uv Python interpreter selector")
379
- installing.add_argument("--bin-dir", default="~/.local/bin")
383
+ installing.add_argument("--bin-dir", default=user_bin_path())
380
384
  installing.add_argument(
381
385
  "--timeout", type=float, default=600, help="seconds per update operation"
382
386
  )
@@ -389,7 +393,7 @@ def main(argv: list[str] | None = None) -> int:
389
393
  source_installing.add_argument("--revision", default="main", help="branch, tag, or commit")
390
394
  source_installing.add_argument("--with", dest="extra", action="append", default=[])
391
395
  source_installing.add_argument("--python", default="3.13")
392
- source_installing.add_argument("--bin-dir", default="~/.local/bin")
396
+ source_installing.add_argument("--bin-dir", default=user_bin_path())
393
397
  source_installing.add_argument("--timeout", type=float, default=600)
394
398
  source_installing.add_argument(
395
399
  "--prepare",