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
-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);
}