refactor: remove Python sidecar setup from CI workflows

- Deleted the setup steps for creating a Python sidecar binary in both build.yml and package-and-publish.yml workflows.
- Removed the associated script for symlinking the system Python to the sidecar path, simplifying the CI configuration.
- Updated package installation steps to exclude Python dependencies, streamlining the build process.
This commit is contained in:
Steven Enamakel
2026-02-04 11:00:54 +05:30
parent 1977e309f9
commit 8a936c8fe1
4 changed files with 2 additions and 116 deletions
+1 -9
View File
@@ -36,15 +36,7 @@ jobs:
- name: Install Tauri dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf python3
- name: Setup Python sidecar binary
run: |
TARGET=$(rustc --print host-tuple)
PYTHON_PATH=$(which python3)
SIDECAR_PATH="src-tauri/runtime-skill-python-${TARGET}"
ln -sf "${PYTHON_PATH}" "${SIDECAR_PATH}"
echo "Created symlink: ${SIDECAR_PATH} -> ${PYTHON_PATH}"
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Cache Cargo registry
uses: actions/cache@v4
+1 -20
View File
@@ -199,7 +199,7 @@ jobs:
if: matrix.settings.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf python3
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install OpenMP (macOS only)
if: matrix.settings.platform == 'macos-latest'
@@ -207,25 +207,6 @@ jobs:
brew install libomp
echo "OpenMP installed for llama-cpp-sys build"
- name: Setup Python sidecar binary (Linux)
if: matrix.settings.platform == 'ubuntu-22.04'
run: |
TARGET=$(rustc --print host-tuple)
PYTHON_PATH=$(which python3)
SIDECAR_PATH="src-tauri/runtime-skill-python-${TARGET}"
ln -sf "${PYTHON_PATH}" "${SIDECAR_PATH}"
echo "Created symlink: ${SIDECAR_PATH} -> ${PYTHON_PATH}"
- name: Setup Python sidecar binary (macOS)
if: matrix.settings.platform == 'macos-latest'
run: |
# Extract target from args (e.g., "--target aarch64-apple-darwin" -> "aarch64-apple-darwin")
TARGET=$(echo "${{ matrix.settings.args }}" | grep -oE '(aarch64|x86_64)-apple-darwin' || rustc --print host-tuple)
PYTHON_PATH=$(which python3 || which python)
SIDECAR_PATH="src-tauri/runtime-skill-python-${TARGET}"
ln -sf "${PYTHON_PATH}" "${SIDECAR_PATH}"
echo "Created symlink: ${SIDECAR_PATH} -> ${PYTHON_PATH}"
- name: Cache Cargo registry
uses: actions/cache@v4
with:
-54
View File
@@ -1,54 +0,0 @@
#!/usr/bin/env node
/**
* Symlink system python3 to src-tauri/runtime-skill-python-<target> for local dev.
* Run from project root: node scripts/setup-python-sidecar.mjs
*/
import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const root = path.resolve(__dirname, '..');
const binariesDir = path.join(root, 'src-tauri');
function getTargetTriple() {
try {
return execSync('rustc --print host-tuple', { encoding: 'utf8' }).trim();
} catch {
const out = execSync('rustc -Vv', { encoding: 'utf8' });
const m = out.match(/host:\s*(.+)/);
if (m) return m[1].trim();
throw new Error('Could not get Rust target triple (rustc not found?)');
}
}
function getSystemPython() {
const isWin = process.platform === 'win32';
try {
const cmd = isWin ? 'where python' : 'which python3';
const out = execSync(cmd, { encoding: 'utf8' }).trim();
const first = out.split(/[\r\n]/)[0].trim();
if (first) return first;
} catch {}
throw new Error(
'System Python not found. Install Python 3 and ensure python3 (or python on Windows) is on PATH.'
);
}
const target = getTargetTriple();
const ext = process.platform === 'win32' ? '.exe' : '';
const sidecarName = `runtime-skill-python-${target}${ext}`;
const sidecarPath = path.join(binariesDir, sidecarName);
const systemPython = getSystemPython();
try {
if (fs.existsSync(sidecarPath)) {
fs.unlinkSync(sidecarPath);
}
fs.symlinkSync(systemPython, sidecarPath);
console.log(`Linked ${sidecarName} -> ${systemPython}`);
} catch (err) {
console.error(err.message);
process.exit(1);
}
-33
View File
@@ -1,33 +0,0 @@
# Tauri sidecar binaries
The app bundles a Python interpreter as a sidecar for skill runtimes (`runtime-skill-python`). The binary lives in `src-tauri/` (next to `tauri.conf.json`) and must be named by target triple.
## Required file
- **Python**: `src-tauri/runtime-skill-python-<TARGET_TRIPLE>` (e.g. `runtime-skill-python-aarch64-apple-darwin`, or `runtime-skill-python-x86_64-pc-windows-msvc.exe` on Windows)
Get your target triple:
```bash
rustc --print host-tuple
```
## Local development (symlink to system Python)
From the project root:
```bash
node scripts/setup-python-sidecar.mjs
```
This creates a symlink at `src-tauri/runtime-skill-python-<target>` pointing to your system `python3`.
## Production / bundled Python
For a standalone app that does not rely on the user having Python installed:
1. **Windows**: Use the [Python embeddable package](https://www.python.org/downloads/windows/). Copy `python.exe` to `src-tauri/runtime-skill-python-x86_64-pc-windows-msvc.exe` (and the same for `aarch64-pc-windows-msvc` if you support ARM). You may need to bundle the rest of the embeddable folder as resources and set `PYTHONHOME` when spawning.
2. **macOS / Linux**: Use [python-build-standalone](https://github.com/astral-sh/python-build-standalone/releases). Copy the `bin/python3` from the extracted tree to `src-tauri/runtime-skill-python-<target>`. Note: the binary may have dynamic library dependencies; for a fully portable build you may need to bundle the whole distribution as resources.
After adding the binary, run `yarn tauri build` (or `yarn tauri dev`); the sidecar will be included in the bundle.