spdx_checker 0.1.4__cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.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.
builder.py ADDED
@@ -0,0 +1,46 @@
1
+ import os
2
+ import sysconfig
3
+ import platform
4
+ from setuptools.command.build_ext import build_ext
5
+
6
+
7
+ INSTALL_BASE = sysconfig.get_config_var("installed_base")
8
+ LIB_DIR = sysconfig.get_config_var("LIBDIR")
9
+ INCLUDE_DIR = sysconfig.get_config_var("INCLUDEPY")
10
+ PYTHON_VERSION = sysconfig.get_config_var("py_version_short")
11
+ PACKAGE_NAME = "spdx_checker"
12
+
13
+
14
+ if LIB_DIR is None:
15
+ # WINODWS only, workaround for Python versions < 3.13.
16
+ LIB_DIR = os.path.join(INSTALL_BASE, "libs")
17
+
18
+
19
+
20
+ class ZigBuilder(build_ext):
21
+ def build_extension(self, ext) -> None:
22
+ is_windows = platform.system() == "Windows"
23
+ is_macos = platform.system() == "Darwin"
24
+
25
+ cmd = [
26
+ "zig",
27
+ "build-lib",
28
+ "-lc",
29
+ "-dynamic",
30
+ "-D",
31
+ "ReleaseFast",
32
+ "-I",
33
+ INCLUDE_DIR,
34
+ "-L",
35
+ LIB_DIR,
36
+ f"-femit-bin={self.get_ext_fullpath(ext.name)}",
37
+ ]
38
+
39
+ if is_windows:
40
+ cmd += ["-l", "python3"]
41
+ elif is_macos:
42
+ cmd += ["-l", "python" + PYTHON_VERSION]
43
+
44
+ cmd.append(ext.sources[0])
45
+
46
+ self.spawn(cmd)
@@ -0,0 +1,35 @@
1
+ Metadata-Version: 2.4
2
+ Name: spdx_checker
3
+ Version: 0.1.4
4
+ Summary: Fast SPDX License Checker for Source Code
5
+ Author-email: Tobias Stach <tobias.stach@gmail.com>
6
+ Requires-Python: >=3.13
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: setuptools
10
+ Dynamic: license-file
11
+ Dynamic: requires-python
12
+
13
+ # SPDX License Checker
14
+
15
+ `spdx-checker` is a fast Python package for validating and analyzing SPDX license headers in your projects. It leverages Zig for exceptional speed and efficiency. The checker raises an error immediately if any file contains an incorrect or missing license header.
16
+
17
+ ## Example Usage
18
+
19
+ ```python
20
+ import spdx_checker
21
+
22
+ spdx_checker.check_license("MIT", ["example1.py", "example2.svelte", "example3.html"])
23
+ ```
24
+
25
+ ## Development
26
+
27
+ Issues with uv caching
28
+
29
+ ```
30
+ To force uv to ignore existing installed versions, pass --reinstall to any installation command (e.g., uv sync --reinstall or uv pip install --reinstall ...).
31
+ ```
32
+
33
+ ## License
34
+
35
+ [MIT](LICENSE)
@@ -0,0 +1,8 @@
1
+ builder.py,sha256=RUZ2YGRvhi-r2KRm5__yAAT0uKb9DXIrA18Vmk2ihzU,1150
2
+ spdx_checker.cpython-312-x86_64-linux-gnu.so,sha256=hLfuDxyIlrVb4lvYTmBm2k-9ah5gTGp8pwAzUoXhJwI,3211480
3
+ spdx_checker.cpython-312-x86_64-linux-gnu.so.o,sha256=9eFqHnfRKgIbsvhBhPF5G2GIGygttzRqPa0a13rgQ8A,2906272
4
+ spdx_checker-0.1.4.dist-info/METADATA,sha256=A5lvM-uXtgitlTphKd6fazTyXBI7moYf9ve3zLrpLlc,984
5
+ spdx_checker-0.1.4.dist-info/WHEEL,sha256=aSgG0F4rGPZtV0iTEIfy6dtHq6g67Lze3uLfk0vWn88,151
6
+ spdx_checker-0.1.4.dist-info/top_level.txt,sha256=0CKwo5BsnFVH1L_s6lYyGScwWHuA6KQlGNPddOwxQ6k,21
7
+ spdx_checker-0.1.4.dist-info/RECORD,,
8
+ spdx_checker-0.1.4.dist-info/licenses/LICENSE,sha256=3Z6usZRRE9Iq4bA3UAarnC8cLpvF655eNYvSJsjIoP8,1063
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-manylinux_2_17_x86_64
5
+ Tag: cp312-cp312-manylinux2014_x86_64
6
+
@@ -0,0 +1,7 @@
1
+ Copyright <2025> <Tobias Stach>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,2 @@
1
+ builder
2
+ spdx_checker