ruby-to-wheel 0.1.0__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,48 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
16
+ steps:
17
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18
+ - uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4.0
19
+ - run: uv python install ${{ matrix.python-version }}
20
+ - run: uv sync --dev
21
+ - run: uv run pytest -vv
22
+
23
+ build:
24
+ needs: test
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28
+ - uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4.0
29
+ - run: uv build
30
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+
35
+ publish:
36
+ needs: build
37
+ runs-on: ubuntu-latest
38
+ environment:
39
+ name: pypi
40
+ url: https://pypi.org/p/ruby-to-wheel
41
+ permissions:
42
+ id-token: write
43
+ steps:
44
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
45
+ with:
46
+ name: dist
47
+ path: dist/
48
+ - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
@@ -0,0 +1,21 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
16
+ steps:
17
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18
+ - uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4.0
19
+ - run: uv python install ${{ matrix.python-version }}
20
+ - run: uv sync --dev
21
+ - run: uv run pytest -vv
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ *.whl
8
+ .python-version
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: ruby-to-wheel
3
+ Version: 0.1.0
4
+ Summary: Package pre-built Ruby binaries into Python wheels
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+
9
+ # ruby-to-wheel
10
+
11
+ [![PyPI version](https://img.shields.io/pypi/v/ruby-to-wheel)](https://pypi.org/project/ruby-to-wheel/)
12
+ [![Test](https://github.com/aktech/ruby-to-wheel/actions/workflows/test.yml/badge.svg)](https://github.com/aktech/ruby-to-wheel/actions/workflows/test.yml)
13
+
14
+ Package pre-built Ruby binaries into Python wheels.
15
+
16
+ `ruby-to-wheel` takes compiled Ruby binaries and wraps them into platform-specific Python wheels with proper entry points, so they can be installed via `pip` and run as CLI commands.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install ruby-to-wheel
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ There are three modes of operation:
27
+
28
+ ### 1. From pre-built binaries (explicit)
29
+
30
+ Provide binaries for each platform explicitly:
31
+
32
+ ```bash
33
+ ruby-to-wheel \
34
+ --name my-tool \
35
+ --version 1.0.0 \
36
+ --binary linux-amd64=/path/to/my-tool-linux-amd64 \
37
+ --binary darwin-arm64=/path/to/my-tool-darwin-arm64
38
+ ```
39
+
40
+ ### 2. From a directory of binaries (auto-detect)
41
+
42
+ Point to a directory containing binaries with platform suffixes in their filenames:
43
+
44
+ ```bash
45
+ ruby-to-wheel \
46
+ --name my-tool \
47
+ --version 1.0.0 \
48
+ --binary-dir ./binaries/
49
+ ```
50
+
51
+ Binaries are matched by filename patterns like `my-tool-linux-amd64`, `my-tool-darwin-arm64`, etc.
52
+
53
+ ### 3. From Ruby source (via Tebako)
54
+
55
+ Build a standalone binary from Ruby source using [Tebako](https://github.com/tamatebako/tebako) and package it into a wheel:
56
+
57
+ ```bash
58
+ ruby-to-wheel \
59
+ --name my-tool \
60
+ --version 1.0.0 \
61
+ --source ./my-ruby-project/
62
+ ```
63
+
64
+ ## Supported Platforms
65
+
66
+ | Platform Key | Wheel Tag |
67
+ |---------------------|----------------------------|
68
+ | `linux-amd64` | `manylinux_2_17_x86_64` |
69
+ | `linux-arm64` | `manylinux_2_17_aarch64` |
70
+ | `linux-amd64-musl` | `musllinux_1_2_x86_64` |
71
+ | `linux-arm64-musl` | `musllinux_1_2_aarch64` |
72
+ | `darwin-amd64` | `macosx_10_9_x86_64` |
73
+ | `darwin-arm64` | `macosx_11_0_arm64` |
74
+ | `windows-amd64` | `win_amd64` |
75
+ | `windows-arm64` | `win_arm64` |
76
+
77
+ ## Options
78
+
79
+ ```
80
+ --name Python package name (required)
81
+ --version Package version (default: 0.1.0)
82
+ --output-dir Directory for built wheels (default: ./dist)
83
+ --entry-point CLI command name (defaults to package name)
84
+ --description Package description
85
+ --requires-python Python version requirement (default: >=3.10)
86
+ --author Author name
87
+ --author-email Author email
88
+ --license License identifier
89
+ --url Project URL
90
+ --readme Path to README for PyPI long description
91
+ --extra-lib Shared library to bundle (repeatable)
92
+ --ruby-version Ruby version for Tebako (default: 3.3.7)
93
+ --source-entry-point Ruby entry point for Tebako (default: bin/{entry-point})
94
+ --platform Override platform detection (for --source mode)
95
+ ```
96
+
97
+ ## How It Works
98
+
99
+ Each generated wheel contains:
100
+
101
+ - A Python package with `__init__.py` and `__main__.py`
102
+ - The compiled binary in a `bin/` subdirectory
103
+ - Optional shared libraries in a `lib/` subdirectory
104
+ - A console script entry point that delegates to the binary
105
+
106
+ When installed, `pip` creates a wrapper script so the binary can be invoked directly by name from the command line.
107
+
108
+ ## License
109
+
110
+ Apache-2.0
@@ -0,0 +1,102 @@
1
+ # ruby-to-wheel
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/ruby-to-wheel)](https://pypi.org/project/ruby-to-wheel/)
4
+ [![Test](https://github.com/aktech/ruby-to-wheel/actions/workflows/test.yml/badge.svg)](https://github.com/aktech/ruby-to-wheel/actions/workflows/test.yml)
5
+
6
+ Package pre-built Ruby binaries into Python wheels.
7
+
8
+ `ruby-to-wheel` takes compiled Ruby binaries and wraps them into platform-specific Python wheels with proper entry points, so they can be installed via `pip` and run as CLI commands.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install ruby-to-wheel
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ There are three modes of operation:
19
+
20
+ ### 1. From pre-built binaries (explicit)
21
+
22
+ Provide binaries for each platform explicitly:
23
+
24
+ ```bash
25
+ ruby-to-wheel \
26
+ --name my-tool \
27
+ --version 1.0.0 \
28
+ --binary linux-amd64=/path/to/my-tool-linux-amd64 \
29
+ --binary darwin-arm64=/path/to/my-tool-darwin-arm64
30
+ ```
31
+
32
+ ### 2. From a directory of binaries (auto-detect)
33
+
34
+ Point to a directory containing binaries with platform suffixes in their filenames:
35
+
36
+ ```bash
37
+ ruby-to-wheel \
38
+ --name my-tool \
39
+ --version 1.0.0 \
40
+ --binary-dir ./binaries/
41
+ ```
42
+
43
+ Binaries are matched by filename patterns like `my-tool-linux-amd64`, `my-tool-darwin-arm64`, etc.
44
+
45
+ ### 3. From Ruby source (via Tebako)
46
+
47
+ Build a standalone binary from Ruby source using [Tebako](https://github.com/tamatebako/tebako) and package it into a wheel:
48
+
49
+ ```bash
50
+ ruby-to-wheel \
51
+ --name my-tool \
52
+ --version 1.0.0 \
53
+ --source ./my-ruby-project/
54
+ ```
55
+
56
+ ## Supported Platforms
57
+
58
+ | Platform Key | Wheel Tag |
59
+ |---------------------|----------------------------|
60
+ | `linux-amd64` | `manylinux_2_17_x86_64` |
61
+ | `linux-arm64` | `manylinux_2_17_aarch64` |
62
+ | `linux-amd64-musl` | `musllinux_1_2_x86_64` |
63
+ | `linux-arm64-musl` | `musllinux_1_2_aarch64` |
64
+ | `darwin-amd64` | `macosx_10_9_x86_64` |
65
+ | `darwin-arm64` | `macosx_11_0_arm64` |
66
+ | `windows-amd64` | `win_amd64` |
67
+ | `windows-arm64` | `win_arm64` |
68
+
69
+ ## Options
70
+
71
+ ```
72
+ --name Python package name (required)
73
+ --version Package version (default: 0.1.0)
74
+ --output-dir Directory for built wheels (default: ./dist)
75
+ --entry-point CLI command name (defaults to package name)
76
+ --description Package description
77
+ --requires-python Python version requirement (default: >=3.10)
78
+ --author Author name
79
+ --author-email Author email
80
+ --license License identifier
81
+ --url Project URL
82
+ --readme Path to README for PyPI long description
83
+ --extra-lib Shared library to bundle (repeatable)
84
+ --ruby-version Ruby version for Tebako (default: 3.3.7)
85
+ --source-entry-point Ruby entry point for Tebako (default: bin/{entry-point})
86
+ --platform Override platform detection (for --source mode)
87
+ ```
88
+
89
+ ## How It Works
90
+
91
+ Each generated wheel contains:
92
+
93
+ - A Python package with `__init__.py` and `__main__.py`
94
+ - The compiled binary in a `bin/` subdirectory
95
+ - Optional shared libraries in a `lib/` subdirectory
96
+ - A console script entry point that delegates to the binary
97
+
98
+ When installed, `pip` creates a wrapper script so the binary can be invoked directly by name from the command line.
99
+
100
+ ## License
101
+
102
+ Apache-2.0
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "ruby-to-wheel"
3
+ version = "0.1.0"
4
+ description = "Package pre-built Ruby binaries into Python wheels"
5
+ requires-python = ">=3.10"
6
+ license = "Apache-2.0"
7
+ readme = "README.md"
8
+ dependencies = []
9
+
10
+ [project.scripts]
11
+ ruby-to-wheel = "ruby_to_wheel:main"
12
+
13
+ [dependency-groups]
14
+ dev = ["pytest>=8.0"]
15
+
16
+ [build-system]
17
+ requires = ["hatchling"]
18
+ build-backend = "hatchling.build"