@glock-org/glock 1.1.38 → 1.1.40
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/package.json +1 -1
- package/scripts/postinstall.js +4 -26
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -156,20 +156,13 @@ async function installPythonDependencies() {
|
|
|
156
156
|
|
|
157
157
|
if (!pythonCmd) {
|
|
158
158
|
console.log('');
|
|
159
|
-
console.
|
|
160
|
-
console.
|
|
161
|
-
console.error(' The TUI interface will not work without Python dependencies.');
|
|
162
|
-
console.error('');
|
|
163
|
-
console.error(' To fix:');
|
|
164
|
-
console.error(' 1. Install Python 3.11+ from https://python.org');
|
|
165
|
-
console.error(' 2. Re-run: npm install @glock-org/glock');
|
|
166
|
-
console.log('');
|
|
159
|
+
console.log('Note: Python 3 not found. Some features may be limited.');
|
|
160
|
+
console.log('Install Python 3.11+ for full functionality.');
|
|
167
161
|
return;
|
|
168
162
|
}
|
|
169
163
|
|
|
170
164
|
console.log('Installing Python dependencies...');
|
|
171
165
|
|
|
172
|
-
// Critical packages for Glock functionality
|
|
173
166
|
const packages = [
|
|
174
167
|
'pillow>=10.0.0',
|
|
175
168
|
'textual>=0.47.0,<1.0.0', // Pin to 0.x - version 1.0+ has breaking changes
|
|
@@ -186,24 +179,9 @@ async function installPythonDependencies() {
|
|
|
186
179
|
execSync(pipCmdNoUser, { stdio: 'pipe' });
|
|
187
180
|
console.log('Python dependencies installed.');
|
|
188
181
|
} catch (err2) {
|
|
189
|
-
// Surface a clear error message - these are critical dependencies
|
|
190
|
-
console.log('');
|
|
191
|
-
console.error('⚠️ WARNING: Failed to install Python dependencies.');
|
|
192
|
-
console.error(' Glock requires pillow and textual for the TUI interface.');
|
|
193
|
-
console.error('');
|
|
194
|
-
console.error(' Error details:');
|
|
195
|
-
// Show the actual error for debugging
|
|
196
|
-
const errorMsg = err2.stderr ? err2.stderr.toString().trim() : err2.message;
|
|
197
|
-
if (errorMsg) {
|
|
198
|
-
console.error(` ${errorMsg.split('\n')[0]}`);
|
|
199
|
-
}
|
|
200
|
-
console.error('');
|
|
201
|
-
console.error(' To fix, manually run:');
|
|
202
|
-
console.error(` ${pythonCmd} -m pip install pillow "textual>=0.47.0,<1.0.0"`);
|
|
203
|
-
console.error('');
|
|
204
|
-
console.error(' If you see permission errors, try:');
|
|
205
|
-
console.error(` ${pythonCmd} -m pip install --user pillow "textual>=0.47.0,<1.0.0"`);
|
|
206
182
|
console.log('');
|
|
183
|
+
console.log('Note: Could not install Python dependencies automatically.');
|
|
184
|
+
console.log('For full functionality, run: pip install pillow');
|
|
207
185
|
}
|
|
208
186
|
}
|
|
209
187
|
}
|