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.
- {pocketshell-0.3.6 → pocketshell-0.3.8}/PKG-INFO +1 -1
- {pocketshell-0.3.6 → pocketshell-0.3.8}/pyproject.toml +1 -1
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/__init__.py +16 -1
- pocketshell-0.3.8/tests/test_cli.py +27 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/uv.lock +1 -1
- {pocketshell-0.3.6 → pocketshell-0.3.8}/.gitignore +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/README.md +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/__main__.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/agent_log.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/cli.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/daemon.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/env.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/hooks.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/jobs.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/logs.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/qr_share.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/repos.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/sessions.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/src/pocketshell/usage.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/__init__.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_agent_log.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_daemon.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_env.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_hooks.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_jobs.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_logs.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_qr_share.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_repos.py +0 -0
- {pocketshell-0.3.6 → pocketshell-0.3.8}/tests/test_sessions.py +0 -0
- {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.
|
|
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.
|
|
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
|
-
|
|
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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|