@vercel/python 6.0.5 → 6.0.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.js +3 -19
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3414,7 +3414,6 @@ async function detectPythonEntrypoint(framework, workPath, configuredEntrypoint)
|
|
|
3414
3414
|
// src/utils.ts
|
|
3415
3415
|
var import_fs3 = __toESM(require("fs"));
|
|
3416
3416
|
var import_path3 = require("path");
|
|
3417
|
-
var import_execa2 = __toESM(require_execa());
|
|
3418
3417
|
var import_build_utils5 = require("@vercel/build-utils");
|
|
3419
3418
|
var isInVirtualEnv = () => {
|
|
3420
3419
|
return process.env.VIRTUAL_ENV;
|
|
@@ -3454,27 +3453,12 @@ async function runPyprojectScript(workPath, scriptNames, env) {
|
|
|
3454
3453
|
return false;
|
|
3455
3454
|
const systemPython = process.platform === "win32" ? "python" : "python3";
|
|
3456
3455
|
const finalEnv = { ...process.env, ...env };
|
|
3457
|
-
|
|
3458
|
-
const uvPath = await getUvBinaryOrInstall(pythonCmd);
|
|
3456
|
+
useVirtualEnv(workPath, finalEnv, systemPython);
|
|
3459
3457
|
const scriptCommand = scripts[scriptToRun];
|
|
3460
3458
|
if (typeof scriptCommand === "string" && scriptCommand.trim()) {
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
if (/^\s*uv(\s|$)/i.test(scriptCommand)) {
|
|
3464
|
-
console.log(`Executing: ${scriptCommand}`);
|
|
3465
|
-
await (0, import_build_utils5.execCommand)(scriptCommand, {
|
|
3466
|
-
cwd: workPath,
|
|
3467
|
-
env: finalEnv
|
|
3468
|
-
});
|
|
3469
|
-
return true;
|
|
3470
|
-
}
|
|
3471
|
-
const args = process.platform === "win32" ? ["run", "cmd", "/d", "/s", "/c", scriptCommand] : ["run", "sh", "-lc", scriptCommand];
|
|
3472
|
-
console.log(
|
|
3473
|
-
`Executing: ${uvPath} ${args.map((a) => /\s/.test(a) ? `"${a.replace(/"/g, '\\"')}"` : a).join(" ")}`
|
|
3474
|
-
);
|
|
3475
|
-
await (0, import_execa2.default)(uvPath, args, {
|
|
3459
|
+
console.log(`Executing: ${scriptCommand}`);
|
|
3460
|
+
await (0, import_build_utils5.execCommand)(scriptCommand, {
|
|
3476
3461
|
cwd: workPath,
|
|
3477
|
-
stdio: "inherit",
|
|
3478
3462
|
env: finalEnv
|
|
3479
3463
|
});
|
|
3480
3464
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@types/jest": "27.4.1",
|
|
22
22
|
"@types/node": "14.18.33",
|
|
23
23
|
"@types/which": "3.0.0",
|
|
24
|
-
"@vercel/build-utils": "13.0
|
|
24
|
+
"@vercel/build-utils": "13.1.0",
|
|
25
25
|
"cross-env": "7.0.3",
|
|
26
26
|
"execa": "^1.0.0",
|
|
27
27
|
"fs-extra": "11.1.1",
|