social-autoposter 1.3.0 → 1.3.1
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/cli.js +11 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -18,6 +18,7 @@ const COPY_TARGETS = [
|
|
|
18
18
|
'scripts',
|
|
19
19
|
'schema-postgres.sql',
|
|
20
20
|
'config.example.json',
|
|
21
|
+
'requirements.txt',
|
|
21
22
|
'SKILL.md',
|
|
22
23
|
'skill',
|
|
23
24
|
'setup',
|
|
@@ -403,14 +404,21 @@ function update() {
|
|
|
403
404
|
// browser binary; we run `playwright install chromium` after the pip install.
|
|
404
405
|
function installPythonDeps() {
|
|
405
406
|
const reqPath = path.join(PKG_ROOT, 'requirements.txt');
|
|
406
|
-
const
|
|
407
|
+
const base = fs.existsSync(reqPath)
|
|
407
408
|
? ['install', '-r', reqPath, '-q']
|
|
408
409
|
: ['install', '-q', 'psycopg2-binary', 'playwright'];
|
|
409
410
|
console.log(' installing Python deps (psycopg2-binary, playwright, ...)');
|
|
410
|
-
|
|
411
|
+
// Debian/Ubuntu 23+ ship a PEP 668 marker that blocks pip3 against the
|
|
412
|
+
// system Python without --break-system-packages. Try without first
|
|
413
|
+
// (safer on macOS) and retry with the flag if the marker fires.
|
|
414
|
+
let r = spawnSync('pip3', base, { stdio: 'inherit' });
|
|
415
|
+
if (r.status !== 0) {
|
|
416
|
+
console.log(' retrying with --break-system-packages (PEP 668 environments)');
|
|
417
|
+
r = spawnSync('pip3', [...base, '--break-system-packages'], { stdio: 'inherit' });
|
|
418
|
+
}
|
|
411
419
|
if (r.status !== 0) {
|
|
412
420
|
console.warn(' WARNING: pip3 install failed — run manually:');
|
|
413
|
-
console.warn(` pip3 ${
|
|
421
|
+
console.warn(` pip3 ${base.join(' ')} --break-system-packages`);
|
|
414
422
|
return;
|
|
415
423
|
}
|
|
416
424
|
// Playwright needs its browser binary downloaded separately. Chromium
|
package/package.json
CHANGED