mdsmith 0.13.3__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.
mdsmith/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """mdsmith — Markdown linter / formatter (Python distribution).
2
+
3
+ This package is a thin wrapper around the prebuilt mdsmith Go binary
4
+ that ships inside each platform-specific wheel under
5
+ ``mdsmith/_bin/``. Importing the package does not start the binary;
6
+ :func:`mdsmith.binary_path` returns its filesystem path and
7
+ :func:`mdsmith.main` execs it with the user's argv.
8
+ """
9
+
10
+ from .__main__ import binary_path, main
11
+
12
+ __all__ = ["binary_path", "main"]
mdsmith/__main__.py ADDED
@@ -0,0 +1,56 @@
1
+ """Entry point for ``python -m mdsmith`` and the ``mdsmith`` console
2
+ script. Locates the prebuilt binary inside the installed wheel and
3
+ execs it with the user's argv. The wheel is platform-tagged, so a
4
+ matching binary is guaranteed to exist on every supported host.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import os
10
+ import sys
11
+ from pathlib import Path
12
+
13
+
14
+ def binary_path() -> Path:
15
+ """Return the absolute path of the bundled mdsmith binary.
16
+
17
+ Wheels ship the binary under ``mdsmith/_bin/mdsmith`` (or
18
+ ``mdsmith/_bin/mdsmith.exe`` on Windows). Raise ``FileNotFoundError``
19
+ if the wheel was unpacked outside the expected layout — that
20
+ only happens when the wrong wheel was installed for the host
21
+ platform, in which case ``pip install`` should have refused.
22
+ """
23
+ here = Path(__file__).resolve().parent
24
+ name = "mdsmith.exe" if os.name == "nt" else "mdsmith"
25
+ candidate = here / "_bin" / name
26
+ if not candidate.is_file():
27
+ raise FileNotFoundError(
28
+ f"mdsmith: bundled binary not found at {candidate}. "
29
+ "The installed wheel does not match this platform; "
30
+ "reinstall mdsmith and ensure pip picks the right wheel "
31
+ "(see https://github.com/jeduden/mdsmith/releases for "
32
+ "direct downloads)."
33
+ )
34
+ return candidate
35
+
36
+
37
+ def main() -> None:
38
+ """Exec the bundled binary with this process's argv.
39
+
40
+ On POSIX platforms ``os.execv`` replaces the current process so
41
+ signal handling, stdout/stderr buffering, and exit codes match
42
+ a direct invocation. Windows has no ``execv`` semantics, so
43
+ ``subprocess.run`` is used and its exit code is propagated.
44
+ """
45
+ bin_path = binary_path()
46
+ argv = [str(bin_path), *sys.argv[1:]]
47
+ if os.name == "nt":
48
+ import subprocess
49
+
50
+ result = subprocess.run(argv, check=False)
51
+ raise SystemExit(result.returncode)
52
+ os.execv(str(bin_path), argv)
53
+
54
+
55
+ if __name__ == "__main__":
56
+ main()
Binary file
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: mdsmith
3
+ Version: 0.13.3
4
+ Summary: Fast, auto-fixing Markdown linter and formatter for docs, READMEs, and AI-generated content.
5
+ Project-URL: Homepage, https://github.com/jeduden/mdsmith
6
+ Project-URL: Source, https://github.com/jeduden/mdsmith
7
+ Project-URL: Issues, https://github.com/jeduden/mdsmith/issues
8
+ License-Expression: MIT
9
+ Keywords: docs,formatter,linter,markdown,mdsmith
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Go
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Topic :: Software Development :: Documentation
20
+ Classifier: Topic :: Software Development :: Quality Assurance
21
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+
25
+ # mdsmith
26
+
27
+ Fast, auto-fixing Markdown linter and formatter for docs, READMEs,
28
+ and AI-generated content. This is the PyPI distribution of the Go
29
+ binary published at
30
+ <https://github.com/jeduden/mdsmith>.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ pip install mdsmith
36
+ # or, without a permanent install:
37
+ uvx mdsmith --help
38
+ pipx install mdsmith
39
+ ```
40
+
41
+ The package ships as one platform-tagged wheel per supported host
42
+ (linux x86_64, linux aarch64, macOS x86_64, macOS arm64, Windows
43
+ amd64). Each wheel bundles the prebuilt Go binary under
44
+ `mdsmith/_bin/`. The `mdsmith` console script execs that binary, so
45
+ no compilation or network call runs at install time.
46
+
47
+ ## Versioning
48
+
49
+ Every PyPI release matches a `vX.Y.Z` git tag in the upstream repo.
50
+ `mdsmith version` reports the same value on every distribution
51
+ channel (npm, PyPI, asdf, mise, the GitHub release, the VS Code
52
+ marketplaces).
53
+
54
+ ## Other channels
55
+
56
+ See [docs/guides/install.md](https://github.com/jeduden/mdsmith/blob/main/docs/guides/install.md)
57
+ for the full list (npm / npx, asdf, mise, direct download, VS Code
58
+ Marketplace, Open VSX).
@@ -0,0 +1,7 @@
1
+ mdsmith/__init__.py,sha256=CsLLa7CyEyGBAUmv5AxCE1GUro4zmjOP631PrMGa_OM,449
2
+ mdsmith/__main__.py,sha256=BWRepB75VUZSGF6dj0I2DuFPHvIHTh0hXAkBx5dYZo4,1966
3
+ mdsmith/_bin/mdsmith.exe,sha256=z1cX6F18qXv6sHe8XPglvHLz1yfZLjL-9r0Sh68t1uI,20598272
4
+ mdsmith-0.13.3.dist-info/METADATA,sha256=jP-CGEd8W_1z90bPA0gojG8AbFJptdeDRESDqS4zl2A,2113
5
+ mdsmith-0.13.3.dist-info/WHEEL,sha256=fip2IBhkkNvH-S_Xh3PV94_XVqHJB1nn9gTAcldDBj4,94
6
+ mdsmith-0.13.3.dist-info/entry_points.txt,sha256=hgFEwfFvf6l7ZWGfYsLQdIhFDGZ3F0ezEyYb1YqHA3E,50
7
+ mdsmith-0.13.3.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-win_amd64
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mdsmith = mdsmith.__main__:main