pocketshell 0.3.6__tar.gz → 0.3.8__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.
Files changed (30) hide show
  1. {pocketshell-0.3.6 → pocketshell-0.3.8}/PKG-INFO +1 -1
  2. {pocketshell-0.3.6 → pocketshell-0.3.8}/pyproject.toml +1 -1
  3. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/__init__.py +16 -1
  4. pocketshell-0.3.8/tests/test_cli.py +27 -0
  5. {pocketshell-0.3.6 → pocketshell-0.3.8}/uv.lock +1 -1
  6. {pocketshell-0.3.6 → pocketshell-0.3.8}/.gitignore +0 -0
  7. {pocketshell-0.3.6 → pocketshell-0.3.8}/README.md +0 -0
  8. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/__main__.py +0 -0
  9. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/agent_log.py +0 -0
  10. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/cli.py +0 -0
  11. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/daemon.py +0 -0
  12. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/env.py +0 -0
  13. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/hooks.py +0 -0
  14. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/jobs.py +0 -0
  15. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/logs.py +0 -0
  16. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/qr_share.py +0 -0
  17. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/repos.py +0 -0
  18. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/sessions.py +0 -0
  19. {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/usage.py +0 -0
  20. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/__init__.py +0 -0
  21. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_agent_log.py +0 -0
  22. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_daemon.py +0 -0
  23. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_env.py +0 -0
  24. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_hooks.py +0 -0
  25. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_jobs.py +0 -0
  26. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_logs.py +0 -0
  27. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_qr_share.py +0 -0
  28. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_repos.py +0 -0
  29. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_sessions.py +0 -0
  30. {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_usage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pocketshell
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: Unified server-side Python utility for the PocketShell Android client.
5
5
  Project-URL: Homepage, https://github.com/alexeygrigorev/pocketshell
6
6
  Project-URL: Issues, https://github.com/alexeygrigorev/pocketshell/issues
@@ -8,7 +8,7 @@ name = "pocketshell"
8
8
  # scripts/check-pypi-version.sh enforces this; .github/workflows/build.yml
9
9
  # runs that check before publishing to PyPI. See
10
10
  # tools/pocketshell/README.md ("Release flow") for the bump procedure.
11
- version = "0.3.6"
11
+ version = "0.3.8"
12
12
  description = "Unified server-side Python utility for the PocketShell Android client."
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
@@ -10,5 +10,20 @@ See https://github.com/alexeygrigorev/pocketshell/issues/170.
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
+ import tomllib
14
+ from importlib.metadata import PackageNotFoundError, version
15
+ from pathlib import Path
16
+
13
17
  __all__ = ["__version__"]
14
- __version__ = "0.3.6"
18
+
19
+
20
+ def _metadata_version() -> str:
21
+ try:
22
+ return version("pocketshell")
23
+ except PackageNotFoundError:
24
+ pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
25
+ with pyproject.open("rb") as handle:
26
+ return tomllib.load(handle)["project"]["version"]
27
+
28
+
29
+ __version__ = _metadata_version()
@@ -0,0 +1,27 @@
1
+ from __future__ import annotations
2
+
3
+ import tomllib
4
+ from pathlib import Path
5
+
6
+ from click.testing import CliRunner
7
+
8
+ from pocketshell import __version__
9
+ from pocketshell.cli import cli
10
+
11
+
12
+ def _pyproject_version() -> str:
13
+ pyproject = Path(__file__).resolve().parents[1] / "pyproject.toml"
14
+ with pyproject.open("rb") as handle:
15
+ return tomllib.load(handle)["project"]["version"]
16
+
17
+
18
+ def test_internal_version_matches_pyproject_metadata() -> None:
19
+ assert __version__ == _pyproject_version()
20
+
21
+
22
+ def test_top_level_version_matches_pyproject_metadata() -> None:
23
+ runner = CliRunner()
24
+ result = runner.invoke(cli, ["--version"])
25
+
26
+ assert result.exit_code == 0, result.output
27
+ assert result.output == f"pocketshell, version {_pyproject_version()}\n"
@@ -143,7 +143,7 @@ wheels = [
143
143
 
144
144
  [[package]]
145
145
  name = "pocketshell"
146
- version = "0.3.6"
146
+ version = "0.3.8"
147
147
  source = { editable = "." }
148
148
  dependencies = [
149
149
  { name = "click" },
File without changes
File without changes