droppass-cli 0.1.3__py3-none-any.whl
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.
- droppass_cli/__init__.py +3 -0
- droppass_cli/__main__.py +5 -0
- droppass_cli/_version.py +1 -0
- droppass_cli/bin/droppass-darwin-arm64 +0 -0
- droppass_cli/bin/droppass-darwin-x64 +0 -0
- droppass_cli/bin/droppass-linux-arm +0 -0
- droppass_cli/bin/droppass-linux-arm64 +0 -0
- droppass_cli/bin/droppass-linux-x64 +0 -0
- droppass_cli/bin/droppass-win32-arm64.exe +0 -0
- droppass_cli/bin/droppass-win32-x64.exe +0 -0
- droppass_cli/launcher.py +106 -0
- droppass_cli-0.1.3.dist-info/METADATA +51 -0
- droppass_cli-0.1.3.dist-info/RECORD +16 -0
- droppass_cli-0.1.3.dist-info/WHEEL +5 -0
- droppass_cli-0.1.3.dist-info/entry_points.txt +2 -0
- droppass_cli-0.1.3.dist-info/top_level.txt +1 -0
droppass_cli/__init__.py
ADDED
droppass_cli/__main__.py
ADDED
droppass_cli/_version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.3"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
droppass_cli/launcher.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
import stat
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
from importlib import resources
|
|
9
|
+
|
|
10
|
+
TARGETS = {
|
|
11
|
+
"darwin-x64": {
|
|
12
|
+
"platform": "darwin",
|
|
13
|
+
"arch": "x64",
|
|
14
|
+
"binary_name": "droppass-darwin-x64",
|
|
15
|
+
},
|
|
16
|
+
"darwin-arm64": {
|
|
17
|
+
"platform": "darwin",
|
|
18
|
+
"arch": "arm64",
|
|
19
|
+
"binary_name": "droppass-darwin-arm64",
|
|
20
|
+
},
|
|
21
|
+
"linux-x64": {
|
|
22
|
+
"platform": "linux",
|
|
23
|
+
"arch": "x64",
|
|
24
|
+
"binary_name": "droppass-linux-x64",
|
|
25
|
+
},
|
|
26
|
+
"linux-arm64": {
|
|
27
|
+
"platform": "linux",
|
|
28
|
+
"arch": "arm64",
|
|
29
|
+
"binary_name": "droppass-linux-arm64",
|
|
30
|
+
},
|
|
31
|
+
"linux-arm": {
|
|
32
|
+
"platform": "linux",
|
|
33
|
+
"arch": "arm",
|
|
34
|
+
"binary_name": "droppass-linux-arm",
|
|
35
|
+
},
|
|
36
|
+
"win32-x64": {
|
|
37
|
+
"platform": "win32",
|
|
38
|
+
"arch": "x64",
|
|
39
|
+
"binary_name": "droppass-win32-x64.exe",
|
|
40
|
+
},
|
|
41
|
+
"win32-arm64": {
|
|
42
|
+
"platform": "win32",
|
|
43
|
+
"arch": "arm64",
|
|
44
|
+
"binary_name": "droppass-win32-arm64.exe",
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def format_target(runtime_platform: str, runtime_arch: str) -> str:
|
|
50
|
+
return f"{runtime_platform}-{runtime_arch}"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def detect_target() -> dict[str, str]:
|
|
54
|
+
runtime_platform = "win32" if sys.platform.startswith("win") else sys.platform
|
|
55
|
+
machine = platform.machine().lower()
|
|
56
|
+
|
|
57
|
+
if runtime_platform == "darwin":
|
|
58
|
+
runtime_arch = "arm64" if machine in {"arm64", "aarch64"} else "x64"
|
|
59
|
+
elif runtime_platform == "linux":
|
|
60
|
+
if machine in {"x86_64", "amd64"}:
|
|
61
|
+
runtime_arch = "x64"
|
|
62
|
+
elif machine in {"aarch64", "arm64"}:
|
|
63
|
+
runtime_arch = "arm64"
|
|
64
|
+
elif machine.startswith("armv7") or machine.startswith("armv6") or machine == "arm":
|
|
65
|
+
runtime_arch = "arm"
|
|
66
|
+
else:
|
|
67
|
+
runtime_arch = machine
|
|
68
|
+
elif runtime_platform == "win32":
|
|
69
|
+
if machine in {"arm64", "aarch64"}:
|
|
70
|
+
runtime_arch = "arm64"
|
|
71
|
+
else:
|
|
72
|
+
runtime_arch = "x64"
|
|
73
|
+
else:
|
|
74
|
+
runtime_arch = machine
|
|
75
|
+
|
|
76
|
+
key = format_target(runtime_platform, runtime_arch)
|
|
77
|
+
target = TARGETS.get(key)
|
|
78
|
+
if not target:
|
|
79
|
+
supported = ", ".join(sorted(TARGETS))
|
|
80
|
+
raise RuntimeError(f"Unsupported platform {key}. Supported targets: {supported}")
|
|
81
|
+
return target
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def resolve_binary_path() -> str:
|
|
85
|
+
target = detect_target()
|
|
86
|
+
binary = resources.files("droppass_cli").joinpath("bin", target["binary_name"])
|
|
87
|
+
if not binary.is_file():
|
|
88
|
+
raise RuntimeError(
|
|
89
|
+
f"Missing embedded binary {target['binary_name']} for "
|
|
90
|
+
f"{format_target(target['platform'], target['arch'])}."
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
path = os.fspath(binary)
|
|
94
|
+
if not path.endswith(".exe"):
|
|
95
|
+
mode = os.stat(path).st_mode
|
|
96
|
+
if not mode & stat.S_IXUSR:
|
|
97
|
+
os.chmod(path, mode | stat.S_IXUSR)
|
|
98
|
+
return path
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def main(argv: list[str] | None = None) -> int:
|
|
102
|
+
binary_path = resolve_binary_path()
|
|
103
|
+
completed = subprocess.run([binary_path, *(argv if argv is not None else sys.argv[1:])])
|
|
104
|
+
if completed.returncode < 0:
|
|
105
|
+
os.kill(os.getpid(), -completed.returncode)
|
|
106
|
+
return completed.returncode
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: droppass-cli
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: droppass CLI distributed via pip
|
|
5
|
+
Author: AFK Surf
|
|
6
|
+
License-Expression: LicenseRef-UNLICENSED
|
|
7
|
+
Project-URL: Homepage, https://github.com/AFK-surf/droppass
|
|
8
|
+
Project-URL: Repository, https://github.com/AFK-surf/droppass
|
|
9
|
+
Keywords: droppass,cli,secrets,agent
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Topic :: Utilities
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# droppass-cli
|
|
22
|
+
|
|
23
|
+
Install globally with pip:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install droppass-cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The package ships a Python launcher plus prebuilt `droppass` binaries for the
|
|
30
|
+
same targets as the standalone release assets:
|
|
31
|
+
|
|
32
|
+
- `darwin-x64`
|
|
33
|
+
- `darwin-arm64`
|
|
34
|
+
- `linux-x64`
|
|
35
|
+
- `linux-arm64`
|
|
36
|
+
- `linux-arm`
|
|
37
|
+
- `win32-x64`
|
|
38
|
+
- `win32-arm64`
|
|
39
|
+
|
|
40
|
+
The launcher selects the matching embedded binary at runtime.
|
|
41
|
+
|
|
42
|
+
Maintainer release flow:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd cli
|
|
46
|
+
node ./scripts/build-pip-package.mjs
|
|
47
|
+
python3 -m build --outdir ./dist/pip/dist ./dist/pip/package
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
CI publishes the package to PyPI from `v*` tags. See `cli/RELEASING.md`
|
|
51
|
+
for the full release workflow.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
droppass_cli/__init__.py,sha256=v-rRiDOgZ3sQSMQKq0vgUQZvpeOkoHFXissAx6Ktg84,61
|
|
2
|
+
droppass_cli/__main__.py,sha256=Hc221v804EzbwhRGwApcX2HDBZQp6sD2-GMpGnoxT74,85
|
|
3
|
+
droppass_cli/_version.py,sha256=XEqb2aiIn8fzGE68Mph4ck1FtQqsR_am0wRWvrYPffQ,22
|
|
4
|
+
droppass_cli/launcher.py,sha256=2pmo0vDQiSdQyj4G94aIV61Mni0Uv4I-5KEhl_zseSE,3130
|
|
5
|
+
droppass_cli/bin/droppass-darwin-arm64,sha256=T5kEIdW4qpCgTDNNLtsYmcbKriPc7u2VUGYNItAvSDI,5830898
|
|
6
|
+
droppass_cli/bin/droppass-darwin-x64,sha256=5Ir0x0BNOoKTpxpzJUxNVRXiKw_5p18b-4iKBhKlv3c,6232336
|
|
7
|
+
droppass_cli/bin/droppass-linux-arm,sha256=qEmzDYEhLc3T90pe0ccso4UYekUgDoZqUQ-qapswdME,5963960
|
|
8
|
+
droppass_cli/bin/droppass-linux-arm64,sha256=dBJ2IRf0fd08SEzNI_kYskrzPU9DIhEsPER76yLsWC0,5701816
|
|
9
|
+
droppass_cli/bin/droppass-linux-x64,sha256=A3njCWBV40qqM2JE03dq1OuOEnGBZtu-MO7yre7QGd4,6041784
|
|
10
|
+
droppass_cli/bin/droppass-win32-arm64.exe,sha256=AgTmnekunjcSaMc5OPjTUEAze4A0f82VgToiXrkOF70,5760000
|
|
11
|
+
droppass_cli/bin/droppass-win32-x64.exe,sha256=jmQ5ul--MkG5EnPIuEvrN1HlXGfiW0F37l-gO7YrdOE,6305280
|
|
12
|
+
droppass_cli-0.1.3.dist-info/METADATA,sha256=iqT7oMZ2bnwunQdCSDWh7_ifIeFuZ7iZp6rNco84DDI,1357
|
|
13
|
+
droppass_cli-0.1.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
14
|
+
droppass_cli-0.1.3.dist-info/entry_points.txt,sha256=SiZcLekVfswNhVFguOhwWjBfsk5_vzwE2MmPKNEJyNY,56
|
|
15
|
+
droppass_cli-0.1.3.dist-info/top_level.txt,sha256=roWRCM_KLFXLbbPBGcHM7hIS5DJfZjH3Hg40DNUBVVI,13
|
|
16
|
+
droppass_cli-0.1.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
droppass_cli
|