@learnrudi/cli 1.8.5 → 1.8.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/dist/index.cjs +10 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -188,16 +188,23 @@ async function installDependencies(stackPath, manifest) {
|
|
|
188
188
|
});
|
|
189
189
|
return { installed: true };
|
|
190
190
|
} else if (runtime === "python") {
|
|
191
|
-
|
|
191
|
+
let requirementsPath = path.join(stackPath, "python", "requirements.txt");
|
|
192
|
+
let reqCwd = path.join(stackPath, "python");
|
|
192
193
|
try {
|
|
193
194
|
await fs.access(requirementsPath);
|
|
194
195
|
} catch {
|
|
195
|
-
|
|
196
|
+
requirementsPath = path.join(stackPath, "requirements.txt");
|
|
197
|
+
reqCwd = stackPath;
|
|
198
|
+
try {
|
|
199
|
+
await fs.access(requirementsPath);
|
|
200
|
+
} catch {
|
|
201
|
+
return { installed: false, reason: "No requirements.txt" };
|
|
202
|
+
}
|
|
196
203
|
}
|
|
197
204
|
const pipCmd = getBundledBinary("python", "pip");
|
|
198
205
|
console.log(` Installing pip dependencies...`);
|
|
199
206
|
(0, import_child_process.execSync)(`"${pipCmd}" install -r requirements.txt`, {
|
|
200
|
-
cwd:
|
|
207
|
+
cwd: reqCwd,
|
|
201
208
|
stdio: "pipe"
|
|
202
209
|
});
|
|
203
210
|
return { installed: true };
|