zals 0.1.0__py3-none-win_amd64.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.
zals/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """Thin Python wrapper around the zals language server binary.
2
+
3
+ The package ships a prebuilt ``zals`` binary for the current platform and
4
+ exposes it as the ``zals`` console script. It is not a reimplementation: the
5
+ wrapper only locates and executes the bundled binary.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ __all__ = ["main"]
11
+
12
+ from ._run import main
zals/__main__.py ADDED
@@ -0,0 +1,10 @@
1
+ """Allow ``python -m zals`` to run the bundled binary."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from ._run import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())
zals/_run.py ADDED
@@ -0,0 +1,37 @@
1
+ """Locate and execute the bundled zals binary."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import subprocess
7
+ import sys
8
+ from pathlib import Path
9
+
10
+
11
+ def binary_path() -> Path:
12
+ """Return the path to the bundled binary for the current platform."""
13
+ name = "zals.exe" if os.name == "nt" else "zals"
14
+ return Path(__file__).resolve().parent / "bin" / name
15
+
16
+
17
+ def main() -> int:
18
+ """Run the bundled language server, forwarding all arguments and stdio."""
19
+ binary = binary_path()
20
+ if not binary.is_file():
21
+ print(
22
+ f"zals: bundled binary not found at {binary}; "
23
+ "reinstall the zals package for this platform",
24
+ file=sys.stderr,
25
+ )
26
+ return 1
27
+
28
+ if os.name != "nt":
29
+ # Replace the wrapper process so stdio and signals go straight to the
30
+ # language server. Wheels do not always preserve the executable bit.
31
+ try:
32
+ binary.chmod(binary.stat().st_mode | 0o111)
33
+ except OSError:
34
+ pass
35
+ os.execv(str(binary), [str(binary), *sys.argv[1:]])
36
+
37
+ return subprocess.call([str(binary), *sys.argv[1:]])
zals/bin/zals.exe ADDED
Binary file
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: zals
3
+ Version: 0.1.0
4
+ Summary: Zig Ansible Language Server
5
+ Author: kksat
6
+ License-Expression: GPL-3.0-only
7
+ Project-URL: Homepage, https://github.com/kksat/zals
8
+ Project-URL: Repository, https://github.com/kksat/zals
9
+ Project-URL: Changelog, https://github.com/kksat/zals/blob/main/CHANGELOG.md
10
+ Keywords: ansible,lsp,language-server,zig
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+
19
+ # zals (Python wrapper)
20
+
21
+ A thin Python wrapper around the [zals](https://github.com/kksat/zals) Zig
22
+ Ansible Language Server. The wheel bundles the prebuilt `zals` binary for the
23
+ current platform and exposes it as the `zals` console script.
24
+
25
+ ```sh
26
+ pip install zals
27
+ zals --version
28
+ ```
29
+
30
+ The wrapper does not reimplement anything: it locates the bundled binary and
31
+ executes it, forwarding all arguments and stdio. Point your LSP client at
32
+ `zals --stdio` with `ansible` as the document language.
33
+
34
+ See the [main repository](https://github.com/kksat/zals) for documentation,
35
+ source, and the release process.
36
+
37
+ ## License
38
+
39
+ GPL-3.0-only.
@@ -0,0 +1,9 @@
1
+ zals/__init__.py,sha256=qihX8UcLHKtNga9Zg7vDghRYLHacpU5o5J645QgQhnE,352
2
+ zals/__main__.py,sha256=u2gAl3N7581Qa0fx31L6w6GZsqYy4TDV-uwQ-b0IzeQ,178
3
+ zals/_run.py,sha256=brYz94B9YLacfqckU5A-2dYb46GqRNCs7zW6oa1Scw4,1119
4
+ zals/bin/zals.exe,sha256=KDEoKRBa8UKV5eE136Sjlzjow4WgPgPp3gffGzaQrC8,2026496
5
+ zals-0.1.0.dist-info/METADATA,sha256=kmHwEisioF2ECkq8WgVcmyXN8Rj7DjBvS9MBjvnJpM0,1276
6
+ zals-0.1.0.dist-info/WHEEL,sha256=Zx98gwb_dQKckJK3HEOVKnxxD52EfU_PXDG_usMJ2ng,98
7
+ zals-0.1.0.dist-info/entry_points.txt,sha256=m-Fb2wTDqqC_h-WD6Co6oh8kZzmWXu2Z1uXRtTl393U,40
8
+ zals-0.1.0.dist-info/top_level.txt,sha256=YbbwUAsBwJ-vykIfmpFTLT_j7c8fSajhirVaFprqg-w,5
9
+ zals-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ zals = zals._run:main
@@ -0,0 +1 @@
1
+ zals