pgplan 0.0.1.dev1__py3-none-macosx_11_0_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.
pgplan/__init__.py ADDED
@@ -0,0 +1,34 @@
1
+ import os
2
+ import sys
3
+ import subprocess
4
+
5
+
6
+ def _get_binary_path():
7
+ """Resolve the pgplan binary bundled in this wheel."""
8
+ bin_dir = os.path.join(os.path.dirname(__file__), "bin")
9
+ if sys.platform == "win32":
10
+ binary = os.path.join(bin_dir, "pgplan.exe")
11
+ else:
12
+ binary = os.path.join(bin_dir, "pgplan")
13
+
14
+ if not os.path.isfile(binary):
15
+ raise FileNotFoundError(
16
+ f"pgplan binary not found at {binary}. "
17
+ "Your platform may not be supported. "
18
+ "See: https://github.com/JacobArthurs/pgplan"
19
+ )
20
+ return binary
21
+
22
+
23
+ def main():
24
+ binary = _get_binary_path()
25
+ try:
26
+ result = subprocess.run(
27
+ [binary] + sys.argv[1:],
28
+ stdin=sys.stdin,
29
+ stdout=sys.stdout,
30
+ stderr=sys.stderr,
31
+ )
32
+ raise SystemExit(result.returncode)
33
+ except KeyboardInterrupt:
34
+ raise SystemExit(130)
pgplan/bin/pgplan ADDED
Binary file
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.1
2
+ Name: pgplan
3
+ Version: 0.0.1.dev1
4
+ Summary: Compare and analyze PostgreSQL EXPLAIN plans from the CLI
5
+ Author: Jacob Arthurs
6
+ License: MIT
7
+ Keywords: postgresql,query-plan,explain,database,optimization
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Other
13
+ Classifier: Topic :: Database
14
+ Requires-Python: >=3.8
15
+ Project-URL: Homepage, https://github.com/JacobArthurs/pgplan
16
+ Project-URL: Repository, https://github.com/JacobArthurs/pgplan
17
+ Project-URL: Issues, https://github.com/JacobArthurs/pgplan/issues
@@ -0,0 +1,6 @@
1
+ pgplan/__init__.py,sha256=hDkMXdhw4zGrM0eZqZ1CjmlZyP6s3zgY9vvGbPxSmTc,917
2
+ pgplan/bin/pgplan,sha256=bvTX2sWqPQ2HaeHnR7nNDUCqmQdVjlZeHMo1uSDDLWw,9445682
3
+ pgplan-0.0.1.dev1.dist-info/METADATA,sha256=sQEoXYzdUfTacajluBpZXTZt79JGajXDGHQ8Zw44ElI,681
4
+ pgplan-0.0.1.dev1.dist-info/WHEEL,sha256=v8tGdiyvsEkU4ig0HkOnDG81ThhtB6IQY3V10VI2aBs,98
5
+ pgplan-0.0.1.dev1.dist-info/entry_points.txt,sha256=hKygqUiFPCN_114UF-ft_L1vYpXV2VBBhEZrHCziK0Q,39
6
+ pgplan-0.0.1.dev1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: pgplan-build
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-macosx_11_0_arm64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pgplan = pgplan:main