@emend-ai/utim 1.46.9 ā 1.46.10
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 -32
- package/package.json +1 -1
package/bin/utim.js
CHANGED
|
@@ -127,52 +127,41 @@ function installEngine(python) {
|
|
|
127
127
|
let termuxFlags = [];
|
|
128
128
|
if (isTermux) {
|
|
129
129
|
process.stderr.write(
|
|
130
|
-
'\nš” Termux detected.
|
|
130
|
+
'\nš” Termux detected. Preparing Android-compatible dependencies...\n\n'
|
|
131
131
|
);
|
|
132
132
|
|
|
133
|
-
// Step 1:
|
|
134
|
-
spawnSync('pkg', ['
|
|
135
|
-
stdio: 'inherit',
|
|
136
|
-
shell: false,
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Step 2: upgrade pip/setuptools/wheel first
|
|
140
|
-
spawnSync(python, ['-m', 'pip', 'install', '--upgrade', '--quiet', 'pip', 'setuptools', 'wheel'], {
|
|
141
|
-
stdio: 'pipe',
|
|
142
|
-
shell: false,
|
|
143
|
-
timeout: 60000,
|
|
144
|
-
});
|
|
133
|
+
// Step 1: upgrade pkg repo list
|
|
134
|
+
spawnSync('pkg', ['update', '-y'], { stdio: 'pipe', shell: false, timeout: 30000 });
|
|
145
135
|
|
|
146
|
-
// Step
|
|
147
|
-
//
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
[
|
|
152
|
-
'-m', 'pip', 'install', '--upgrade', '--quiet',
|
|
153
|
-
'pydantic-core',
|
|
154
|
-
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
|
|
155
|
-
],
|
|
136
|
+
// Step 2: install pydantic via Termux's own compiled package.
|
|
137
|
+
// This is the ONLY reliable way to get pydantic-core on Android without
|
|
138
|
+
// a Rust toolchain. pkg ships a prebuilt binary for aarch64-linux-android.
|
|
139
|
+
process.stderr.write('ā Installing pydantic via Termux package manager...\n\n');
|
|
140
|
+
const pkgResult = spawnSync(
|
|
141
|
+
'pkg', ['install', '-y', 'python-pydantic', 'python-cryptography'],
|
|
156
142
|
{ stdio: 'inherit', shell: false, timeout: 120000 }
|
|
157
143
|
);
|
|
158
144
|
|
|
159
|
-
if (
|
|
145
|
+
if (pkgResult.status !== 0) {
|
|
160
146
|
process.stderr.write(
|
|
161
|
-
'\nā
|
|
147
|
+
'\nā pkg install failed ā will try pip with prebuilt wheel index as fallback...\n\n'
|
|
162
148
|
);
|
|
163
|
-
// Fallback:
|
|
149
|
+
// Fallback: Eutalix prebuilt wheels (works for Python 3.11/3.12)
|
|
164
150
|
spawnSync(
|
|
165
151
|
python,
|
|
166
|
-
[
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
'--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
|
|
170
|
-
],
|
|
152
|
+
['-m', 'pip', 'install', '--upgrade', '--quiet',
|
|
153
|
+
'pydantic-core', 'pydantic',
|
|
154
|
+
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/'],
|
|
171
155
|
{ stdio: 'inherit', shell: false, timeout: 120000 }
|
|
172
156
|
);
|
|
173
157
|
}
|
|
174
158
|
|
|
175
|
-
//
|
|
159
|
+
// Step 3: upgrade pip/setuptools/wheel
|
|
160
|
+
spawnSync(python, ['-m', 'pip', 'install', '--upgrade', '--quiet', 'pip', 'setuptools', 'wheel'], {
|
|
161
|
+
stdio: 'pipe', shell: false, timeout: 60000,
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Extra index as safety net for any remaining Rust-based transitive deps
|
|
176
165
|
termuxFlags = [
|
|
177
166
|
'--extra-index-url', 'https://eutalix.github.io/android-pydantic-core/',
|
|
178
167
|
'--extra-index-url', 'https://termux-user-repository.github.io/pypi/',
|