inclean 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.
Binary file
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: inclean
3
+ Version: 0.1.0
4
+ Classifier: License :: OSI Approved :: BSD License
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: Topic :: Software Development :: Build Tools
7
+ Classifier: Topic :: Software Development :: Pre-processors
8
+ License-File: LICENSE
9
+ Summary: A C/C++ #include path normalizer that rewrites includes to resolve cleanly against a minimal -I set.
10
+ Author-email: inaku <inaku.gs@gmail.com>
11
+ License: BSD-3-Clause
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
14
+ Project-URL: Issues, https://github.com/inaku-Gyan/inclean/issues
15
+ Project-URL: Repository, https://github.com/inaku-Gyan/inclean
16
+
17
+ # inclean
18
+
19
+ A C/C++ `#include` path normalizer.
20
+
21
+ Many legacy C/C++ libraries `#include` headers by bare filename
22
+ (`#include "bar.h"`) even though the actual header lives several
23
+ directories deep (`src/internal/bar.h`). To consume such a library a
24
+ caller must add every internal directory to their `-I` list — which
25
+ pollutes their include namespace and breaks the library's
26
+ encapsulation.
27
+
28
+ `inclean` does a one-shot, source-level normalization. It scans every
29
+ source file in the library and rewrites each `#include` so it resolves
30
+ cleanly against a small, explicit set of allowed include directories.
31
+ After running `inclean`, consumers only `-I` the allowed directories.
32
+
33
+ ---
34
+
35
+ ## Install
36
+
37
+ From source (Rust 1.91+):
38
+
39
+ ```sh
40
+ cargo install --path .
41
+ ```
42
+
43
+ ## Quick start
44
+
45
+ `inclean` is driven by an `inclean.toml` placed at the root of the
46
+ library you want to clean up. A typical workflow:
47
+
48
+ ```sh
49
+ inclean init # write a documented starter inclean.toml
50
+ $EDITOR inclean.toml # tell it where your headers live
51
+ inclean check # dry-run: report every proposed change
52
+ inclean diff # see the rewrites as a unified diff
53
+ inclean apply # write the rewrites in place
54
+ ```
55
+
56
+ Every command except `explain` takes an optional `[DIR]` argument — the
57
+ directory containing the root `inclean.toml`. It defaults to `.`.
58
+
59
+ ### Example
60
+
61
+ Take a "flat" library where headers live at
62
+ `include/mylib/internal/foo.h` but internal `#include`s use just the
63
+ basename. The fixture under
64
+ [tests/fixtures/flat-library/](tests/fixtures/flat-library/) ships
65
+ this config:
66
+
67
+ ```toml
68
+ [project]
69
+ root = "."
70
+
71
+ [[rule]]
72
+ name = "base"
73
+ paths = ["src/**", "include/**"]
74
+ forms = ["quote"]
75
+ allowed_include_dirs = ["include"]
76
+ original_include_dirs = ["include/mylib/internal"]
77
+ ```
78
+
79
+ A source line `#include "foo.h"` is rewritten to
80
+ `#include "mylib/internal/foo.h"` — so the consumer only needs
81
+ `-Iinclude`.
82
+
83
+ ## Commands
84
+
85
+ | Command | Purpose |
86
+ | ---------------------------------------- | ----------------------------------------------------------------------------- |
87
+ | `inclean init [DIR]` | Generate a documented starter `inclean.toml`. Refuses to overwrite. |
88
+ | `inclean check [DIR] [-l/--level LEVEL]` | Read-only check at one of three depths. Never writes. |
89
+ | `inclean diff [DIR]` | Print a unified diff of every proposed rewrite. |
90
+ | `inclean apply [DIR]` | Apply rewrites in place. Refuses if any rule-tree conflict is present. |
91
+ | `inclean explain FILE [INCLUDE]` | Trace, layer-by-layer, which rule matches a given `#include` — debugging aid. |
92
+
93
+ `inclean check` runs at one of three levels (`-l config | rules |
94
+ full`, default `full`). Each level is a strict superset of the
95
+ previous; see [docs/configuration.md](docs/configuration.md#inclean-check-levels)
96
+ for the full breakdown.
97
+
98
+ ## Documentation
99
+
100
+ - **[docs/configuration.md](docs/configuration.md)** — full
101
+ `inclean.toml` schema: the five-layer matching model, inheritance,
102
+ `@std.*` constants, actions, placeholders, exit codes.
103
+ - **[docs/architecture.md](docs/architecture.md)** — code-level
104
+ architecture: module map, pipeline phases, key invariants.
105
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** — toolchain, dev workflow,
106
+ conventions, scope.
107
+ - **[CHANGELOG.md](CHANGELOG.md)** — release history.
108
+
109
+ ## Status
110
+
111
+ `0.1` — feature-complete for v1. See [CHANGELOG.md](CHANGELOG.md).
112
+
113
+ ## License
114
+
115
+ [BSD 3-Clause](LICENSE).
116
+
@@ -0,0 +1,6 @@
1
+ inclean-0.1.0.data/scripts/inclean.exe,sha256=qz57rbaQnZ3Kmtene5RqhdrUesVVdUKjtZkd0vkI-to,3855872
2
+ inclean-0.1.0.dist-info/METADATA,sha256=XHIG3WrPSxbDNc_KUiydAYUKVnh7_jKBqqJ7YxR6MzQ,4420
3
+ inclean-0.1.0.dist-info/WHEEL,sha256=fxUURV-tpz4EGoGaAcyzIZ0CMCngNhGnetS-bU4AaSg,94
4
+ inclean-0.1.0.dist-info/licenses/LICENSE,sha256=ohdj_Zem3NAb984ThDYX7wSNbR9uBFR_SoooKLwbKzY,1520
5
+ inclean-0.1.0.dist-info/sboms/inclean.cyclonedx.json,sha256=pHgaSwtXjl7Ctxr9aOv-njGmReW7_yUZjOaKkomxbLA,67718
6
+ inclean-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.13.3)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, inaku
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.