@emend-ai/utim 1.46.8 ā 1.46.9
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 +40 -9
- package/package.json +1 -1
package/bin/utim.js
CHANGED
|
@@ -124,28 +124,59 @@ function runPip(python, extraFlags) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
function installEngine(python) {
|
|
127
|
-
// Termux: install prebuilt system cryptography package to bypass heavy rust compile
|
|
128
127
|
let termuxFlags = [];
|
|
129
128
|
if (isTermux) {
|
|
130
129
|
process.stderr.write(
|
|
131
|
-
'\nš” Termux
|
|
130
|
+
'\nš” Termux detected. Installing prebuilt system packages...\n\n'
|
|
132
131
|
);
|
|
132
|
+
|
|
133
|
+
// Step 1: install prebuilt system-level cryptography to avoid Rust/C compilation
|
|
133
134
|
spawnSync('pkg', ['install', '-y', 'python-cryptography'], {
|
|
134
135
|
stdio: 'inherit',
|
|
135
136
|
shell: false,
|
|
136
137
|
});
|
|
137
138
|
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
|
|
141
|
-
'--extra-index-url', 'https://termux-user-repository.github.io/pypi/'
|
|
142
|
-
];
|
|
143
|
-
|
|
144
|
-
spawnSync(python, ['-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools', 'wheel'], {
|
|
139
|
+
// Step 2: upgrade pip/setuptools/wheel first
|
|
140
|
+
spawnSync(python, ['-m', 'pip', 'install', '--upgrade', '--quiet', 'pip', 'setuptools', 'wheel'], {
|
|
145
141
|
stdio: 'pipe',
|
|
146
142
|
shell: false,
|
|
147
143
|
timeout: 60000,
|
|
148
144
|
});
|
|
145
|
+
|
|
146
|
+
// Step 3: pre-install pydantic-core from the Android pre-built wheel index
|
|
147
|
+
// BEFORE installing utim-cli, so pip never tries to compile it from Rust source.
|
|
148
|
+
process.stderr.write('\nā Pre-installing pydantic-core (Android prebuilt wheel)...\n\n');
|
|
149
|
+
const pydanticInstall = spawnSync(
|
|
150
|
+
python,
|
|
151
|
+
[
|
|
152
|
+
'-m', 'pip', 'install', '--upgrade', '--quiet',
|
|
153
|
+
'pydantic-core',
|
|
154
|
+
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
|
|
155
|
+
],
|
|
156
|
+
{ stdio: 'inherit', shell: false, timeout: 120000 }
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
if (pydanticInstall.status !== 0) {
|
|
160
|
+
process.stderr.write(
|
|
161
|
+
'\nā pydantic-core prebuilt install failed. Will try Termux repository fallback...\n\n'
|
|
162
|
+
);
|
|
163
|
+
// Fallback: Termux user repository
|
|
164
|
+
spawnSync(
|
|
165
|
+
python,
|
|
166
|
+
[
|
|
167
|
+
'-m', 'pip', 'install', '--upgrade', '--quiet',
|
|
168
|
+
'pydantic-core',
|
|
169
|
+
'--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
|
|
170
|
+
],
|
|
171
|
+
{ stdio: 'inherit', shell: false, timeout: 120000 }
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Extra index flags for the main utim-cli install (catches any remaining Rust deps)
|
|
176
|
+
termuxFlags = [
|
|
177
|
+
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
|
|
178
|
+
'--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
|
|
179
|
+
];
|
|
149
180
|
}
|
|
150
181
|
|
|
151
182
|
const spinner = createSpinner('Setting up UTIM (first run)');
|