@emend-ai/utim 1.45.2 ā 1.45.6
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.
- package/bin/utim.js +21 -2
- package/package.json +1 -1
package/bin/utim.js
CHANGED
|
@@ -128,12 +128,31 @@ function installEngine(python) {
|
|
|
128
128
|
// Termux: install prebuilt system packages first to skip pydantic-core compilation
|
|
129
129
|
if (isTermux) {
|
|
130
130
|
process.stderr.write(
|
|
131
|
-
'\nš” Termux:
|
|
131
|
+
'\nš” Termux: adding Termux User Repository (tur-repo) to find prebuilt python-pydantic...\n\n'
|
|
132
132
|
);
|
|
133
|
-
|
|
133
|
+
// Register tur-repo first (contains prebuilt python-pydantic)
|
|
134
|
+
spawnSync('pkg', ['install', '-y', 'tur-repo'], { stdio: 'inherit', shell: false });
|
|
135
|
+
|
|
136
|
+
process.stderr.write(
|
|
137
|
+
'\nš” Termux: installing prebuilt system cryptography and pydantic packages...\n\n'
|
|
138
|
+
);
|
|
139
|
+
const r1 = spawnSync('pkg', ['install', '-y', 'python-cryptography', 'python-pydantic'], {
|
|
134
140
|
stdio: 'inherit',
|
|
135
141
|
shell: false,
|
|
136
142
|
});
|
|
143
|
+
|
|
144
|
+
// Fallback: If prebuilt system packages fail to install, install Rust compiler toolchain
|
|
145
|
+
// so pip can compile pydantic-core and cryptography from source
|
|
146
|
+
if (r1.status !== 0) {
|
|
147
|
+
process.stderr.write(
|
|
148
|
+
'\nš” Prebuilt package setup failed. Installing build dependencies (rust, clang) to compile from source...\n\n'
|
|
149
|
+
);
|
|
150
|
+
spawnSync('pkg', ['install', '-y', 'clang', 'rust', 'make', 'libfft-dev', 'libffi-dev', 'openssl-dev'], {
|
|
151
|
+
stdio: 'inherit',
|
|
152
|
+
shell: false,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
137
156
|
spawnSync(python, ['-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools', 'wheel'], {
|
|
138
157
|
stdio: 'pipe',
|
|
139
158
|
shell: false,
|