wheeltruth 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 hao li
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: wheeltruth
3
+ Version: 0.1.0
4
+ Summary: Check that your built wheel/sdist actually contains everything the package needs
5
+ Author: hao li
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/hahahahahahahahah6/wheeltruth
8
+ Keywords: pypi,wheel,packaging,ci,sdist
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Dynamic: license-file
13
+
14
+ # wheeltruth
15
+
16
+ **Your tests passed. Your published wheel is missing files.**
17
+
18
+ `wheeltruth` checks that your built wheel/sdist actually contains everything the
19
+ package needs — before your users find out the hard way.
20
+
21
+ ## The problem
22
+
23
+ `twine check` verifies your README renders. Nothing in the standard toolchain
24
+ verifies that the *files* made it into the artifact. Two real cases from 2026:
25
+
26
+ - **MLX v0.32.0** (2026-07-25): the macOS ARM64 wheel shipped `py.typed` but
27
+ silently dropped every `.pyi` stub the previous release had. Downstream type
28
+ checking broke, and the test suite never noticed — because tests run against
29
+ the source tree, not the wheel.
30
+ - **OpenSpace** (2026-06-14): a tracked `host_skills/` directory vanished from
31
+ the built distribution, breaking integrations for everyone who installed it.
32
+
33
+ Build backends, MANIFEST.in glitches, and `package-data` misconfigurations drop
34
+ files quietly. `wheeltruth` inspects the artifact itself — the thing PyPI
35
+ actually serves — not your repo.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install wheeltruth
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ```bash
46
+ # Check one or more built artifacts
47
+ wheeltruth check dist/*
48
+
49
+ # Compare a wheel against its sdist (catches files dropped between the two)
50
+ wheeltruth check dist/mypkg-1.0-py3-none-any.whl dist/mypkg-1.0.tar.gz
51
+
52
+ # Also verify expected packages from the project config
53
+ wheeltruth check dist/* --project .
54
+
55
+ # Install into a throwaway venv and import every top-level module
56
+ wheeltruth check dist/*.whl --smoke
57
+
58
+ # Machine-readable report for CI logs / PR comments
59
+ wheeltruth check dist/* --report md
60
+ ```
61
+
62
+ Exit code is `0` when clean, `1` when issues are found — drop it straight into CI:
63
+
64
+ ```yaml
65
+ - name: Build
66
+ run: python -m build
67
+ - name: Verify artifacts
68
+ run: |
69
+ pip install wheeltruth
70
+ wheeltruth check dist/*
71
+ ```
72
+
73
+ ## What it checks
74
+
75
+ **Wheel only**
76
+ - `RECORD` completeness: every file in the zip is listed, every listed file
77
+ exists, and sha256 hashes/sizes match (tampered or hand-edited wheels fail).
78
+ - `entry_points.txt`: every `console_scripts`/`gui_scripts` target resolves to
79
+ a module actually inside the wheel (no more `ModuleNotFoundError` on first run).
80
+ - Typing stub consistency: if a package ships *some* `.pyi` stubs, every
81
+ module should have one — a half-dropped stub set (the MLX case) is flagged.
82
+ - `METADATA` name/version consistency with the wheel filename.
83
+
84
+ **Wheel vs sdist**
85
+ - Files tracked in the sdist's packages that never made it into the wheel
86
+ (the OpenSpace case), and vice versa. Handles `src/` layouts and ignores
87
+ `tests/`, `docs/`, etc.
88
+
89
+ **With `--project .`**
90
+ - Packages declared in `pyproject.toml` / `setup.cfg` / `setup.py` (or
91
+ auto-discovered) actually exist in the wheel.
92
+
93
+ **With `--smoke`**
94
+ - Installs the wheel into a throwaway venv (`--no-deps --no-index`) and
95
+ imports every top-level module.
96
+
97
+ ## Limitations (v0.1)
98
+
99
+ - v0.1 is **check-only**: it reports problems, it doesn't fix your build config.
100
+ - Heuristics, not proof: "expected files" are inferred from the sdist or
101
+ project config. Exotic layouts may produce false positives — file an issue.
102
+ - `--smoke` needs a working `venv` + `pip` and takes a few seconds per wheel.
103
+ - Stub checks are consistency checks; they can't know what the *previous*
104
+ release shipped.
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,95 @@
1
+ # wheeltruth
2
+
3
+ **Your tests passed. Your published wheel is missing files.**
4
+
5
+ `wheeltruth` checks that your built wheel/sdist actually contains everything the
6
+ package needs — before your users find out the hard way.
7
+
8
+ ## The problem
9
+
10
+ `twine check` verifies your README renders. Nothing in the standard toolchain
11
+ verifies that the *files* made it into the artifact. Two real cases from 2026:
12
+
13
+ - **MLX v0.32.0** (2026-07-25): the macOS ARM64 wheel shipped `py.typed` but
14
+ silently dropped every `.pyi` stub the previous release had. Downstream type
15
+ checking broke, and the test suite never noticed — because tests run against
16
+ the source tree, not the wheel.
17
+ - **OpenSpace** (2026-06-14): a tracked `host_skills/` directory vanished from
18
+ the built distribution, breaking integrations for everyone who installed it.
19
+
20
+ Build backends, MANIFEST.in glitches, and `package-data` misconfigurations drop
21
+ files quietly. `wheeltruth` inspects the artifact itself — the thing PyPI
22
+ actually serves — not your repo.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ pip install wheeltruth
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```bash
33
+ # Check one or more built artifacts
34
+ wheeltruth check dist/*
35
+
36
+ # Compare a wheel against its sdist (catches files dropped between the two)
37
+ wheeltruth check dist/mypkg-1.0-py3-none-any.whl dist/mypkg-1.0.tar.gz
38
+
39
+ # Also verify expected packages from the project config
40
+ wheeltruth check dist/* --project .
41
+
42
+ # Install into a throwaway venv and import every top-level module
43
+ wheeltruth check dist/*.whl --smoke
44
+
45
+ # Machine-readable report for CI logs / PR comments
46
+ wheeltruth check dist/* --report md
47
+ ```
48
+
49
+ Exit code is `0` when clean, `1` when issues are found — drop it straight into CI:
50
+
51
+ ```yaml
52
+ - name: Build
53
+ run: python -m build
54
+ - name: Verify artifacts
55
+ run: |
56
+ pip install wheeltruth
57
+ wheeltruth check dist/*
58
+ ```
59
+
60
+ ## What it checks
61
+
62
+ **Wheel only**
63
+ - `RECORD` completeness: every file in the zip is listed, every listed file
64
+ exists, and sha256 hashes/sizes match (tampered or hand-edited wheels fail).
65
+ - `entry_points.txt`: every `console_scripts`/`gui_scripts` target resolves to
66
+ a module actually inside the wheel (no more `ModuleNotFoundError` on first run).
67
+ - Typing stub consistency: if a package ships *some* `.pyi` stubs, every
68
+ module should have one — a half-dropped stub set (the MLX case) is flagged.
69
+ - `METADATA` name/version consistency with the wheel filename.
70
+
71
+ **Wheel vs sdist**
72
+ - Files tracked in the sdist's packages that never made it into the wheel
73
+ (the OpenSpace case), and vice versa. Handles `src/` layouts and ignores
74
+ `tests/`, `docs/`, etc.
75
+
76
+ **With `--project .`**
77
+ - Packages declared in `pyproject.toml` / `setup.cfg` / `setup.py` (or
78
+ auto-discovered) actually exist in the wheel.
79
+
80
+ **With `--smoke`**
81
+ - Installs the wheel into a throwaway venv (`--no-deps --no-index`) and
82
+ imports every top-level module.
83
+
84
+ ## Limitations (v0.1)
85
+
86
+ - v0.1 is **check-only**: it reports problems, it doesn't fix your build config.
87
+ - Heuristics, not proof: "expected files" are inferred from the sdist or
88
+ project config. Exotic layouts may produce false positives — file an issue.
89
+ - `--smoke` needs a working `venv` + `pip` and takes a few seconds per wheel.
90
+ - Stub checks are consistency checks; they can't know what the *previous*
91
+ release shipped.
92
+
93
+ ## License
94
+
95
+ MIT
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "wheeltruth"
7
+ version = "0.1.0"
8
+ description = "Check that your built wheel/sdist actually contains everything the package needs"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [{name = "hao li"}]
13
+ keywords = ["pypi", "wheel", "packaging", "ci", "sdist"]
14
+
15
+ [project.scripts]
16
+ wheeltruth = "wheeltruth.cli:main"
17
+
18
+ [project.urls]
19
+ Homepage = "https://github.com/hahahahahahahahah6/wheeltruth"
20
+
21
+ [tool.setuptools.packages.find]
22
+ where = ["src"]
23
+ include = ["wheeltruth*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """wheeltruth: check that your built wheel/sdist contains what it should."""
2
+
3
+ __version__ = "0.1.0"