commitfmt 0.0.1__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,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: commitfmt
3
+ Version: 0.0.1
4
+ Summary: Utility for formatting and verifying the commit message.
5
+ Author-email: Mikhael Khrustik <misha@myrt.co>
6
+ License: MIT
7
+ Keywords: git,hook
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: commitfmt_windows==0.1.5; sys_platform == "win32"
19
+ Requires-Dist: commitfmt_openbsd==0.1.5; sys_platform == "openbsd"
20
+ Requires-Dist: commitfmt_freebsd==0.1.5; sys_platform == "freebsd"
21
+ Requires-Dist: commitfmt_darwin==0.1.5; sys_platform == "darwin"
22
+ Requires-Dist: commitfmt_linux==0.1.5; sys_platform == "linux"
23
+
24
+ # commitfmt python wrapper
@@ -0,0 +1 @@
1
+ # commitfmt python wrapper
@@ -0,0 +1 @@
1
+ """commitfmt python wrapper."""
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env python
2
+ """commitfmt python wrapper script."""
3
+
4
+ import sys
5
+ from .commitfmt import run
6
+
7
+ def main():
8
+ """Wrapper entrypoint."""
9
+ try:
10
+ ret = run(sys.argv[1:])
11
+ except FileNotFoundError:
12
+ print("commitfmt binary not found")
13
+ ret = 1
14
+
15
+ sys.exit(ret)
16
+
17
+ if __name__ == "__main__":
18
+ sys.exit(run(sys.argv[1:]))
@@ -0,0 +1,35 @@
1
+ """commitfmt python wrapper entrypoint."""
2
+ from os import path
3
+ import platform
4
+ import subprocess
5
+
6
+ ARCH_REPLACEMENT = {
7
+ 'aarch64': 'arm64',
8
+ }
9
+
10
+ def binary_path(os_name=None, arch=None):
11
+ """Returns path to commitfmt binary for selected platform.
12
+ If os_name or arch is None, the current platform is used."""
13
+ if os_name is None:
14
+ os_name = platform.system().lower()
15
+ if arch is None:
16
+ arch = platform.machine().lower()
17
+ if arch in ARCH_REPLACEMENT:
18
+ arch = ARCH_REPLACEMENT.get(arch)
19
+
20
+ ext = ".exe" if os_name == "windows" else ""
21
+ package = f"commitfmt_{os_name}"
22
+ binary = f"commitfmt_{arch}{ext}"
23
+ return path.join(path.dirname(__file__), "..", package, binary)
24
+
25
+ def run(args=None):
26
+ """Run commitfmt."""
27
+ binary = binary_path()
28
+ if not path.isfile(binary):
29
+ raise FileNotFoundError
30
+ cmd = [binary]
31
+ if args is not None:
32
+ cmd += args
33
+
34
+ result = subprocess.run(cmd, check=False)
35
+ return result.returncode
@@ -0,0 +1,24 @@
1
+ Metadata-Version: 2.4
2
+ Name: commitfmt
3
+ Version: 0.0.1
4
+ Summary: Utility for formatting and verifying the commit message.
5
+ Author-email: Mikhael Khrustik <misha@myrt.co>
6
+ License: MIT
7
+ Keywords: git,hook
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: commitfmt_windows==0.1.5; sys_platform == "win32"
19
+ Requires-Dist: commitfmt_openbsd==0.1.5; sys_platform == "openbsd"
20
+ Requires-Dist: commitfmt_freebsd==0.1.5; sys_platform == "freebsd"
21
+ Requires-Dist: commitfmt_darwin==0.1.5; sys_platform == "darwin"
22
+ Requires-Dist: commitfmt_linux==0.1.5; sys_platform == "linux"
23
+
24
+ # commitfmt python wrapper
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ commitfmt/__init__.py
4
+ commitfmt/__main__.py
5
+ commitfmt/commitfmt.py
6
+ commitfmt.egg-info/PKG-INFO
7
+ commitfmt.egg-info/SOURCES.txt
8
+ commitfmt.egg-info/dependency_links.txt
9
+ commitfmt.egg-info/entry_points.txt
10
+ commitfmt.egg-info/requires.txt
11
+ commitfmt.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ commitfmt = commitfmt.__main__:main
@@ -0,0 +1,15 @@
1
+
2
+ [:sys_platform == "darwin"]
3
+ commitfmt_darwin==0.1.5
4
+
5
+ [:sys_platform == "freebsd"]
6
+ commitfmt_freebsd==0.1.5
7
+
8
+ [:sys_platform == "linux"]
9
+ commitfmt_linux==0.1.5
10
+
11
+ [:sys_platform == "openbsd"]
12
+ commitfmt_openbsd==0.1.5
13
+
14
+ [:sys_platform == "win32"]
15
+ commitfmt_windows==0.1.5
@@ -0,0 +1 @@
1
+ commitfmt
@@ -0,0 +1,29 @@
1
+ [project]
2
+ name = "commitfmt"
3
+ authors = [
4
+ {name = "Mikhael Khrustik", email = "misha@myrt.co"},
5
+ ]
6
+ description = "Utility for formatting and verifying the commit message."
7
+ version = "0.0.1"
8
+ readme = "README.md"
9
+ requires-python = ">=3.9"
10
+ keywords = ["git", "hook"]
11
+ license = {text = "MIT"}
12
+ classifiers = [
13
+ "License :: OSI Approved :: MIT License",
14
+ "Development Status :: 5 - Production/Stable",
15
+ "Intended Audience :: Developers",
16
+ "Programming Language :: Python :: 3.9",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ ]
22
+ dependencies = [
23
+ "commitfmt_windows==0.1.5; sys_platform == 'win32'",
24
+ "commitfmt_openbsd==0.1.5; sys_platform == 'openbsd'",
25
+ "commitfmt_freebsd==0.1.5; sys_platform == 'freebsd'",
26
+ "commitfmt_darwin==0.1.5; sys_platform == 'darwin'",
27
+ "commitfmt_linux==0.1.5; sys_platform == 'linux'",
28
+ ]
29
+ scripts = { "commitfmt"="commitfmt.__main__:main" }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+