container-source-policy 0.1.0__py3-none-win_arm64.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.
@@ -0,0 +1 @@
1
+ # container-source-policy Python package
@@ -0,0 +1,4 @@
1
+ from .main import main
2
+
3
+ if __name__ == "__main__":
4
+ exit(main())
@@ -0,0 +1,24 @@
1
+ import os
2
+ import sys
3
+ import platform
4
+ import subprocess
5
+
6
+ ISSUE_URL = "https://github.com/tinovyatkin/container-source-policy/issues/new"
7
+ ARCH_MAPPING = {
8
+ 'amd64': 'x86_64',
9
+ 'aarch64': 'arm64',
10
+ }
11
+
12
+ def main():
13
+ os_name = platform.system().lower()
14
+ arch = platform.machine().lower()
15
+ arch = ARCH_MAPPING.get(arch, arch)
16
+ ext = os_name == "windows" and ".exe" or ""
17
+ subfolder = f"container-source-policy-{os_name}-{arch}"
18
+ executable = os.path.join(os.path.dirname(__file__), "bin", subfolder, "container-source-policy"+ext)
19
+ if not os.path.isfile(executable):
20
+ print(f"Couldn't find binary {executable}. Please create an issue: {ISSUE_URL}", file=sys.stderr)
21
+ return 1
22
+
23
+ result = subprocess.run([executable] + sys.argv[1:])
24
+ return result.returncode
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.4
2
+ Name: container-source-policy
3
+ Version: 0.1.0
4
+ Summary: Generate Buildx container source policy file for a given Dockerfile
5
+ Project-URL: Homepage, https://github.com/tinovyatkin/container-source-policy
6
+ Author-email: Konstantin Vyatkin <tino@vtkn.io>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Topic :: Software Development :: Version Control :: Git
11
+ Requires-Python: >=3.14.2
12
+ Description-Content-Type: text/markdown
13
+
14
+ # container-source-policy
15
+
16
+ Generate a Docker BuildKit **source policy** file (`docker buildx build --source-policy-file …`) by parsing Dockerfiles and pinning `FROM` images to
17
+ immutable digests.
18
+
19
+ This PyPI package ships a small Python launcher plus a prebuilt `container-source-policy` binary for your platform.
20
+
21
+ ## Install
22
+
23
+ Recommended (isolated):
24
+
25
+ ```bash
26
+ pipx install container-source-policy
27
+ ```
28
+
29
+ Or into the current environment:
30
+
31
+ ```bash
32
+ python -m pip install container-source-policy
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```bash
38
+ container-source-policy pin --stdout Dockerfile > source-policy.json
39
+ docker buildx build --source-policy-file source-policy.json -t my-image:dev .
40
+ ```
41
+
42
+ ## More info
43
+
44
+ See the upstream repository for full documentation:
45
+ <https://github.com/tinovyatkin/container-source-policy>
@@ -0,0 +1,8 @@
1
+ container_source_policy/__init__.py,sha256=WqxYUfnQ2VRQNO9KfC4diCXevbuI6E9cyHRPxsMoKuM,41
2
+ container_source_policy/__main__.py,sha256=z5moQcdshy05LlNQYw9I3amxNkTz_LXOBneYYIqQfTE,68
3
+ container_source_policy/main.py,sha256=PFe9TmPv5qZ9duxf0zzj8upww2YcEXnyvBqYOD7m7vI,796
4
+ container_source_policy-0.1.0.dist-info/METADATA,sha256=qMdEZN-CZZkTxFiO6CE6HAR_BQB5oYpTsLNvwJ-HFlA,1286
5
+ container_source_policy-0.1.0.dist-info/WHEEL,sha256=mXkdL_XRmPp4X--kQXny_YeBPwi88uRCVtYlEFl1Dl4,93
6
+ container_source_policy-0.1.0.dist-info/entry_points.txt,sha256=RKhsdJJtC8GTxm-xHrf8OEhKu6e9ZhBneyKXbrMHXCw,78
7
+ container_source_policy-0.1.0.dist-info/licenses/LICENSE,sha256=3hn6jP5dLbOTJAkzSi0xxBnEKL_ZTFf2EMDc4yJjhQI,1075
8
+ container_source_policy-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-win_arm64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ container-source-policy = container_source_policy.main:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Konstantin Vyatkin
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.