haybarn-cli 1.5.2rc7__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.
@@ -0,0 +1,67 @@
1
+ """haybarn-cli — Python wheel that bundles the haybarn native binary.
2
+
3
+ The `console_scripts` entry point `haybarn = haybarn_cli:main` becomes a
4
+ small launcher script that, when invoked, locates the bundled binary
5
+ inside this package and re-exec's into it. Same end-user UX as the npm
6
+ meta-package: `uvx haybarn-cli -c "PRAGMA version;"`.
7
+
8
+ The actual binary lives at `haybarn_cli/_bin/haybarn` (or `haybarn.exe`
9
+ on Windows) and is platform-specific — each PyPI wheel ships only the
10
+ binary for its `manylinux` / `musllinux` / `macosx` / `win` tag, so pip
11
+ and uv install the right one automatically.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import os
17
+ import subprocess
18
+ import sys
19
+
20
+
21
+ def _binary_path() -> str:
22
+ here = os.path.dirname(os.path.abspath(__file__))
23
+ binname = "haybarn.exe" if sys.platform == "win32" else "haybarn"
24
+ return os.path.join(here, "_bin", binname)
25
+
26
+
27
+ def main() -> None:
28
+ binpath = _binary_path()
29
+ if not os.path.exists(binpath):
30
+ sys.stderr.write(
31
+ f"haybarn-cli: bundled binary missing at {binpath}.\n"
32
+ "This usually means the wheel was built without a binary "
33
+ "(e.g. from sdist) or installed with --no-binary. Reinstall "
34
+ "with a binary wheel:\n"
35
+ " pip install --only-binary=:all: haybarn-cli\n"
36
+ "or run via uvx/pipx instead:\n"
37
+ " uvx haybarn-cli -- <args>\n"
38
+ )
39
+ sys.exit(127)
40
+
41
+ # pip/installer doesn't always preserve the +x bit on files inside the
42
+ # package directory (the wheel's zip stores it via external_attr but
43
+ # some installer backends strip it during unpack). Chmod defensively on
44
+ # POSIX; the operation is a no-op if the bit is already set, and the
45
+ # try/except handles read-only filesystems / shared installs where the
46
+ # user can't change permissions.
47
+ if sys.platform != "win32" and not os.access(binpath, os.X_OK):
48
+ try:
49
+ os.chmod(binpath, 0o755)
50
+ except OSError:
51
+ sys.stderr.write(
52
+ f"haybarn-cli: binary at {binpath} is not executable and "
53
+ f"chmod failed (read-only install?). Try: chmod +x {binpath}\n"
54
+ )
55
+ sys.exit(126)
56
+
57
+ args = [binpath, *sys.argv[1:]]
58
+
59
+ if sys.platform == "win32":
60
+ # On Windows, os.execv replaces the current process but the
61
+ # entry-point launcher (.exe) doesn't propagate that cleanly.
62
+ # subprocess.run with stdio inherit is the right primitive.
63
+ result = subprocess.run(args)
64
+ sys.exit(result.returncode)
65
+
66
+ # POSIX: replace this process so signals + exit codes pass through.
67
+ os.execv(binpath, args)
Binary file
@@ -0,0 +1,7 @@
1
+ Copyright 2018-2025 Stichting DuckDB Foundation
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,65 @@
1
+ Metadata-Version: 2.1
2
+ Name: haybarn-cli
3
+ Version: 1.5.2rc7
4
+ Summary: Haybarn CLI — pre-built haybarn binary, runnable via uvx haybarn-cli or pipx run haybarn-cli.
5
+ Home-page: https://github.com/Query-farm-haybarn/haybarn
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Database
16
+ Project-URL: Homepage, https://github.com/Query-farm-haybarn/haybarn
17
+ Project-URL: Source, https://github.com/Query-farm-haybarn/haybarn
18
+
19
+ # `haybarn-cli` on PyPI
20
+
21
+ Run [Haybarn](https://github.com/Query-farm-haybarn/haybarn) — an
22
+ independent derived distribution of [DuckDB](https://duckdb.org) —
23
+ directly from PyPI:
24
+
25
+ ```sh
26
+ uvx haybarn-cli -c "SELECT 'powered by DuckDB' AS haybarn;"
27
+ # or
28
+ pipx run haybarn-cli -c "SELECT 'powered by DuckDB' AS haybarn;"
29
+ ```
30
+
31
+ ## What this is
32
+
33
+ `haybarn-cli` is a binary-distribution package. Each PyPI wheel embeds
34
+ the pre-built `haybarn` binary for one platform, tagged so `pip` / `uv`
35
+ auto-select the correct one:
36
+
37
+ - `manylinux_2_28_x86_64` — glibc-based Linux on x86_64
38
+ - `manylinux_2_28_aarch64` — glibc-based Linux on aarch64
39
+ - `musllinux_1_2_x86_64` — Alpine / musl Linux on x86_64
40
+ - `musllinux_1_2_aarch64` — Alpine / musl Linux on aarch64
41
+ - `macosx_11_0_x86_64` — macOS 11+ on Intel
42
+ - `macosx_11_0_arm64` — macOS 11+ on Apple Silicon
43
+ - `win_amd64` — 64-bit Windows
44
+
45
+ The Python shim (`haybarn_cli:main`) `os.execv`s into the bundled
46
+ binary, so signals and exit codes propagate naturally.
47
+
48
+ ## Versions
49
+
50
+ - `uvx haybarn-cli` — latest stable.
51
+ - `uvx haybarn-cli@1.5.2rc7` — pin to a specific release candidate.
52
+ (PEP 440 normalizes `1.5.2-rc7` → `1.5.2rc7`.)
53
+
54
+ ## Related
55
+
56
+ - **`haybarn`** (npm) — same binary, run via `npx haybarn`.
57
+ - **`haybarn-python`** (PyPI, future) — Python *library* with native
58
+ bindings (`import haybarn as duckdb`). Different package; this one
59
+ is just the CLI.
60
+
61
+ ## Trademark
62
+
63
+ Haybarn is an independent derived distribution of DuckDB published by
64
+ [Query Farm LLC](https://query.farm). Not affiliated with or endorsed
65
+ by the DuckDB Foundation. DuckDB is a trademark of the DuckDB Foundation.
@@ -0,0 +1,7 @@
1
+ haybarn_cli/__init__.py,sha256=7V-kK-BcexlAUwDtRv7ceNXiWVygpZ2Gj9dDVJS9Ddc,2654
2
+ haybarn_cli/_bin/haybarn.exe,sha256=kJB_dFeKcPQzRT9EueEqfClhUV_aYYVY6Znyj3givpg,29443072
3
+ haybarn_cli-1.5.2rc7.dist-info/METADATA,sha256=LvSsmh_wdV6_QfWFMvx_TSWX2-KlQ1NZmZx1hNt1YIY,2376
4
+ haybarn_cli-1.5.2rc7.dist-info/WHEEL,sha256=ujzmxi2hEkJVQsXGE2yIuLjM0KGKwbQuIoGvd0OAxk4,100
5
+ haybarn_cli-1.5.2rc7.dist-info/entry_points.txt,sha256=FK93OBV8NBXx0slUv0EiLdjwtoZwGLW-D-Xpg8pReqg,76
6
+ haybarn_cli-1.5.2rc7.dist-info/LICENSE,sha256=fhf9MSSfqHXLOxxeBcbD6Zt1UJ9qKATKF2wheDTeHcs,1072
7
+ haybarn_cli-1.5.2rc7.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: haybarn build_wheel.py
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ haybarn = haybarn_cli:main
3
+ haybarn-cli = haybarn_cli:main