@vercel/python 6.4.0 → 6.4.2
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 +21 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2873,9 +2873,17 @@ var UvRunner = class {
|
|
|
2873
2873
|
env: this.getVenvEnv(venvPath)
|
|
2874
2874
|
});
|
|
2875
2875
|
} catch (err) {
|
|
2876
|
-
|
|
2876
|
+
const error = new Error(
|
|
2877
2877
|
`Failed to run "${pretty}": ${err instanceof Error ? err.message : String(err)}`
|
|
2878
2878
|
);
|
|
2879
|
+
if (err && typeof err === "object") {
|
|
2880
|
+
if ("code" in err) {
|
|
2881
|
+
error.code = err.code;
|
|
2882
|
+
} else if ("signal" in err) {
|
|
2883
|
+
error.code = err.signal;
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
throw error;
|
|
2879
2887
|
}
|
|
2880
2888
|
}
|
|
2881
2889
|
getVenvEnv(venvPath) {
|
|
@@ -3493,9 +3501,11 @@ async function detectInstallSource({
|
|
|
3493
3501
|
async function createPyprojectToml({
|
|
3494
3502
|
projectName,
|
|
3495
3503
|
pyprojectPath,
|
|
3496
|
-
dependencies
|
|
3504
|
+
dependencies,
|
|
3505
|
+
pythonVersion
|
|
3497
3506
|
}) {
|
|
3498
|
-
const
|
|
3507
|
+
const version2 = pythonVersion ?? DEFAULT_PYTHON_VERSION;
|
|
3508
|
+
const requiresPython = `~=${version2}.0`;
|
|
3499
3509
|
const depsToml = dependencies.length > 0 ? [
|
|
3500
3510
|
"dependencies = [",
|
|
3501
3511
|
...dependencies.map((dep) => ` "${dep}",`),
|
|
@@ -3554,6 +3564,7 @@ async function ensureUvProject({
|
|
|
3554
3564
|
repoRootPath,
|
|
3555
3565
|
pythonPath,
|
|
3556
3566
|
pipPath,
|
|
3567
|
+
pythonVersion,
|
|
3557
3568
|
uv,
|
|
3558
3569
|
venvPath,
|
|
3559
3570
|
meta,
|
|
@@ -3617,7 +3628,8 @@ async function ensureUvProject({
|
|
|
3617
3628
|
await createPyprojectToml({
|
|
3618
3629
|
projectName: "app",
|
|
3619
3630
|
pyprojectPath,
|
|
3620
|
-
dependencies: []
|
|
3631
|
+
dependencies: [],
|
|
3632
|
+
pythonVersion
|
|
3621
3633
|
});
|
|
3622
3634
|
}
|
|
3623
3635
|
await uv.addFromFile({
|
|
@@ -3640,7 +3652,8 @@ async function ensureUvProject({
|
|
|
3640
3652
|
await createPyprojectToml({
|
|
3641
3653
|
projectName: "app",
|
|
3642
3654
|
pyprojectPath,
|
|
3643
|
-
dependencies: []
|
|
3655
|
+
dependencies: [],
|
|
3656
|
+
pythonVersion
|
|
3644
3657
|
});
|
|
3645
3658
|
}
|
|
3646
3659
|
await uv.addFromFile({
|
|
@@ -3657,7 +3670,8 @@ async function ensureUvProject({
|
|
|
3657
3670
|
await createPyprojectToml({
|
|
3658
3671
|
projectName: "app",
|
|
3659
3672
|
pyprojectPath,
|
|
3660
|
-
dependencies: []
|
|
3673
|
+
dependencies: [],
|
|
3674
|
+
pythonVersion
|
|
3661
3675
|
});
|
|
3662
3676
|
await uv.lock(projectDir);
|
|
3663
3677
|
}
|
|
@@ -4553,6 +4567,7 @@ var build = async ({
|
|
|
4553
4567
|
repoRootPath,
|
|
4554
4568
|
pythonPath: pythonVersion.pythonPath,
|
|
4555
4569
|
pipPath: pythonVersion.pipPath,
|
|
4570
|
+
pythonVersion: pythonVersion.version,
|
|
4556
4571
|
uv,
|
|
4557
4572
|
venvPath,
|
|
4558
4573
|
meta,
|