@vercel/python 6.2.0 → 6.2.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/dist/index.js +79 -122
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var require_windows = __commonJS({
|
|
|
48
48
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
|
|
49
49
|
module2.exports = isexe;
|
|
50
50
|
isexe.sync = sync;
|
|
51
|
-
var
|
|
51
|
+
var fs4 = require("fs");
|
|
52
52
|
function checkPathExt(path, options) {
|
|
53
53
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
54
54
|
if (!pathext) {
|
|
@@ -73,12 +73,12 @@ var require_windows = __commonJS({
|
|
|
73
73
|
return checkPathExt(path, options);
|
|
74
74
|
}
|
|
75
75
|
function isexe(path, options, cb) {
|
|
76
|
-
|
|
76
|
+
fs4.stat(path, function(er, stat) {
|
|
77
77
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function sync(path, options) {
|
|
81
|
-
return checkStat(
|
|
81
|
+
return checkStat(fs4.statSync(path), path, options);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
});
|
|
@@ -88,14 +88,14 @@ var require_mode = __commonJS({
|
|
|
88
88
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
|
|
89
89
|
module2.exports = isexe;
|
|
90
90
|
isexe.sync = sync;
|
|
91
|
-
var
|
|
91
|
+
var fs4 = require("fs");
|
|
92
92
|
function isexe(path, options, cb) {
|
|
93
|
-
|
|
93
|
+
fs4.stat(path, function(er, stat) {
|
|
94
94
|
cb(er, er ? false : checkStat(stat, options));
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
function sync(path, options) {
|
|
98
|
-
return checkStat(
|
|
98
|
+
return checkStat(fs4.statSync(path), options);
|
|
99
99
|
}
|
|
100
100
|
function checkStat(stat, options) {
|
|
101
101
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -119,7 +119,7 @@ var require_mode = __commonJS({
|
|
|
119
119
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
120
120
|
var require_isexe = __commonJS({
|
|
121
121
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
|
|
122
|
-
var
|
|
122
|
+
var fs4 = require("fs");
|
|
123
123
|
var core;
|
|
124
124
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
125
125
|
core = require_windows();
|
|
@@ -395,7 +395,7 @@ var require_shebang_command = __commonJS({
|
|
|
395
395
|
var require_readShebang = __commonJS({
|
|
396
396
|
"../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
|
|
397
397
|
"use strict";
|
|
398
|
-
var
|
|
398
|
+
var fs4 = require("fs");
|
|
399
399
|
var shebangCommand = require_shebang_command();
|
|
400
400
|
function readShebang(command) {
|
|
401
401
|
const size = 150;
|
|
@@ -408,9 +408,9 @@ var require_readShebang = __commonJS({
|
|
|
408
408
|
}
|
|
409
409
|
let fd;
|
|
410
410
|
try {
|
|
411
|
-
fd =
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
fd = fs4.openSync(command, "r");
|
|
412
|
+
fs4.readSync(fd, buffer, 0, size, 0);
|
|
413
|
+
fs4.closeSync(fd);
|
|
414
414
|
} catch (e) {
|
|
415
415
|
}
|
|
416
416
|
return shebangCommand(buffer.toString());
|
|
@@ -1895,9 +1895,9 @@ var require_pump = __commonJS({
|
|
|
1895
1895
|
"../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports, module2) {
|
|
1896
1896
|
var once = require_once();
|
|
1897
1897
|
var eos = require_end_of_stream();
|
|
1898
|
-
var
|
|
1898
|
+
var fs4;
|
|
1899
1899
|
try {
|
|
1900
|
-
|
|
1900
|
+
fs4 = require("fs");
|
|
1901
1901
|
} catch (e) {
|
|
1902
1902
|
}
|
|
1903
1903
|
var noop = function() {
|
|
@@ -1909,9 +1909,9 @@ var require_pump = __commonJS({
|
|
|
1909
1909
|
var isFS = function(stream) {
|
|
1910
1910
|
if (!ancient)
|
|
1911
1911
|
return false;
|
|
1912
|
-
if (!
|
|
1912
|
+
if (!fs4)
|
|
1913
1913
|
return false;
|
|
1914
|
-
return (stream instanceof (
|
|
1914
|
+
return (stream instanceof (fs4.ReadStream || noop) || stream instanceof (fs4.WriteStream || noop)) && isFn(stream.close);
|
|
1915
1915
|
};
|
|
1916
1916
|
var isRequest = function(stream) {
|
|
1917
1917
|
return stream.setHeader && isFn(stream.abort);
|
|
@@ -2748,7 +2748,7 @@ __export(src_exports, {
|
|
|
2748
2748
|
version: () => version
|
|
2749
2749
|
});
|
|
2750
2750
|
module.exports = __toCommonJS(src_exports);
|
|
2751
|
-
var
|
|
2751
|
+
var import_fs4 = __toESM(require("fs"));
|
|
2752
2752
|
var import_util = require("util");
|
|
2753
2753
|
var import_path5 = require("path");
|
|
2754
2754
|
var import_build_utils7 = require("@vercel/build-utils");
|
|
@@ -2767,6 +2767,7 @@ var import_path = require("path");
|
|
|
2767
2767
|
var import_build_utils = require("@vercel/build-utils");
|
|
2768
2768
|
var import_execa = __toESM(require_execa());
|
|
2769
2769
|
var isWin = process.platform === "win32";
|
|
2770
|
+
var UV_PYTHON_DOWNLOADS_MODE = "automatic";
|
|
2770
2771
|
var isInVirtualEnv = () => {
|
|
2771
2772
|
return process.env.VIRTUAL_ENV;
|
|
2772
2773
|
};
|
|
@@ -2793,9 +2794,7 @@ function useVirtualEnv(workPath, env, systemPython) {
|
|
|
2793
2794
|
function getProtectedUvEnv(baseEnv = process.env) {
|
|
2794
2795
|
return {
|
|
2795
2796
|
...baseEnv,
|
|
2796
|
-
|
|
2797
|
-
// The build environment must use the pre-installed system Python.
|
|
2798
|
-
UV_PYTHON_DOWNLOADS: "never"
|
|
2797
|
+
UV_PYTHON_DOWNLOADS: UV_PYTHON_DOWNLOADS_MODE
|
|
2799
2798
|
};
|
|
2800
2799
|
}
|
|
2801
2800
|
function createVenvEnv(venvPath, baseEnv = process.env) {
|
|
@@ -3780,97 +3779,28 @@ function isInstalled2({ pipPath, pythonPath }) {
|
|
|
3780
3779
|
|
|
3781
3780
|
// src/start-dev-server.ts
|
|
3782
3781
|
var import_child_process = require("child_process");
|
|
3783
|
-
var
|
|
3782
|
+
var import_fs3 = require("fs");
|
|
3784
3783
|
var import_path4 = require("path");
|
|
3785
3784
|
var import_build_utils6 = require("@vercel/build-utils");
|
|
3786
3785
|
|
|
3787
3786
|
// src/entrypoint.ts
|
|
3788
|
-
var import_fs3 = __toESM(require("fs"));
|
|
3789
3787
|
var import_path3 = require("path");
|
|
3790
3788
|
var import_build_utils4 = require("@vercel/build-utils");
|
|
3791
3789
|
var import_build_utils5 = require("@vercel/build-utils");
|
|
3792
|
-
var
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
if (!fsPath)
|
|
3804
|
-
return false;
|
|
3805
|
-
const contents = import_fs3.default.readFileSync(fsPath, "utf8");
|
|
3806
|
-
return FASTAPI_CONTENT_REGEX.test(contents);
|
|
3807
|
-
} catch {
|
|
3808
|
-
return false;
|
|
3809
|
-
}
|
|
3810
|
-
}
|
|
3811
|
-
var FLASK_ENTRYPOINT_FILENAMES = ["app", "index", "server", "main"];
|
|
3812
|
-
var FLASK_ENTRYPOINT_DIRS = ["", "src", "app", "api"];
|
|
3813
|
-
var FLASK_CONTENT_REGEX = /(from\s+flask\s+import\s+Flask|import\s+flask|Flask\s*\()/;
|
|
3814
|
-
var FLASK_CANDIDATE_ENTRYPOINTS = FLASK_ENTRYPOINT_FILENAMES.flatMap(
|
|
3815
|
-
(filename) => FLASK_ENTRYPOINT_DIRS.map(
|
|
3790
|
+
var PYTHON_ENTRYPOINT_FILENAMES = [
|
|
3791
|
+
"app",
|
|
3792
|
+
"index",
|
|
3793
|
+
"server",
|
|
3794
|
+
"main",
|
|
3795
|
+
"wsgi",
|
|
3796
|
+
"asgi"
|
|
3797
|
+
];
|
|
3798
|
+
var PYTHON_ENTRYPOINT_DIRS = ["", "src", "app", "api"];
|
|
3799
|
+
var PYTHON_CANDIDATE_ENTRYPOINTS = PYTHON_ENTRYPOINT_FILENAMES.flatMap(
|
|
3800
|
+
(filename) => PYTHON_ENTRYPOINT_DIRS.map(
|
|
3816
3801
|
(dir) => import_path3.posix.join(dir, `${filename}.py`)
|
|
3817
3802
|
)
|
|
3818
3803
|
);
|
|
3819
|
-
function isFlaskEntrypoint(file) {
|
|
3820
|
-
try {
|
|
3821
|
-
const fsPath = file.fsPath;
|
|
3822
|
-
if (!fsPath)
|
|
3823
|
-
return false;
|
|
3824
|
-
const contents = import_fs3.default.readFileSync(fsPath, "utf8");
|
|
3825
|
-
return FLASK_CONTENT_REGEX.test(contents);
|
|
3826
|
-
} catch {
|
|
3827
|
-
return false;
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
async function detectFlaskEntrypoint(workPath, configuredEntrypoint) {
|
|
3831
|
-
const entry = configuredEntrypoint.endsWith(".py") ? configuredEntrypoint : `${configuredEntrypoint}.py`;
|
|
3832
|
-
try {
|
|
3833
|
-
const fsFiles = await (0, import_build_utils4.glob)("**", workPath);
|
|
3834
|
-
if (fsFiles[entry])
|
|
3835
|
-
return entry;
|
|
3836
|
-
const candidates = FLASK_CANDIDATE_ENTRYPOINTS.filter(
|
|
3837
|
-
(c) => !!fsFiles[c]
|
|
3838
|
-
);
|
|
3839
|
-
if (candidates.length > 0) {
|
|
3840
|
-
const flaskEntrypoint = candidates.find(
|
|
3841
|
-
(c) => isFlaskEntrypoint(fsFiles[c])
|
|
3842
|
-
) || candidates[0];
|
|
3843
|
-
(0, import_build_utils4.debug)(`Detected Flask entrypoint: ${flaskEntrypoint}`);
|
|
3844
|
-
return flaskEntrypoint;
|
|
3845
|
-
}
|
|
3846
|
-
return null;
|
|
3847
|
-
} catch {
|
|
3848
|
-
(0, import_build_utils4.debug)("Failed to discover entrypoint for Flask");
|
|
3849
|
-
return null;
|
|
3850
|
-
}
|
|
3851
|
-
}
|
|
3852
|
-
async function detectFastapiEntrypoint(workPath, configuredEntrypoint) {
|
|
3853
|
-
const entry = configuredEntrypoint.endsWith(".py") ? configuredEntrypoint : `${configuredEntrypoint}.py`;
|
|
3854
|
-
try {
|
|
3855
|
-
const fsFiles = await (0, import_build_utils4.glob)("**", workPath);
|
|
3856
|
-
if (fsFiles[entry])
|
|
3857
|
-
return entry;
|
|
3858
|
-
const candidates = FASTAPI_CANDIDATE_ENTRYPOINTS.filter(
|
|
3859
|
-
(c) => !!fsFiles[c]
|
|
3860
|
-
);
|
|
3861
|
-
if (candidates.length > 0) {
|
|
3862
|
-
const fastapiEntrypoint = candidates.find(
|
|
3863
|
-
(c) => isFastapiEntrypoint(fsFiles[c])
|
|
3864
|
-
) || candidates[0];
|
|
3865
|
-
(0, import_build_utils4.debug)(`Detected FastAPI entrypoint: ${fastapiEntrypoint}`);
|
|
3866
|
-
return fastapiEntrypoint;
|
|
3867
|
-
}
|
|
3868
|
-
return null;
|
|
3869
|
-
} catch {
|
|
3870
|
-
(0, import_build_utils4.debug)("Failed to discover entrypoint for FastAPI");
|
|
3871
|
-
return null;
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
3804
|
async function getPyprojectEntrypoint(workPath) {
|
|
3875
3805
|
const pyprojectData = await (0, import_build_utils5.readConfigFile)((0, import_path3.join)(workPath, "pyproject.toml"));
|
|
3876
3806
|
if (!pyprojectData)
|
|
@@ -3897,13 +3827,38 @@ async function getPyprojectEntrypoint(workPath) {
|
|
|
3897
3827
|
return null;
|
|
3898
3828
|
}
|
|
3899
3829
|
}
|
|
3900
|
-
async function
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3830
|
+
async function detectGenericPythonEntrypoint(workPath, configuredEntrypoint) {
|
|
3831
|
+
const entry = configuredEntrypoint.endsWith(".py") ? configuredEntrypoint : `${configuredEntrypoint}.py`;
|
|
3832
|
+
try {
|
|
3833
|
+
const fsFiles = await (0, import_build_utils4.glob)("**", workPath);
|
|
3834
|
+
if (fsFiles[entry]) {
|
|
3835
|
+
const isValid = await (0, import_build_utils4.isPythonEntrypoint)(fsFiles[entry]);
|
|
3836
|
+
if (isValid) {
|
|
3837
|
+
(0, import_build_utils4.debug)(`Using configured Python entrypoint: ${entry}`);
|
|
3838
|
+
return entry;
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
const candidates = PYTHON_CANDIDATE_ENTRYPOINTS.filter(
|
|
3842
|
+
(c) => !!fsFiles[c]
|
|
3843
|
+
);
|
|
3844
|
+
for (const candidate of candidates) {
|
|
3845
|
+
const isValid = await (0, import_build_utils4.isPythonEntrypoint)(fsFiles[candidate]);
|
|
3846
|
+
if (isValid) {
|
|
3847
|
+
(0, import_build_utils4.debug)(`Detected Python entrypoint: ${candidate}`);
|
|
3848
|
+
return candidate;
|
|
3849
|
+
}
|
|
3850
|
+
}
|
|
3851
|
+
return null;
|
|
3852
|
+
} catch {
|
|
3853
|
+
(0, import_build_utils4.debug)("Failed to discover Python entrypoint");
|
|
3854
|
+
return null;
|
|
3906
3855
|
}
|
|
3856
|
+
}
|
|
3857
|
+
async function detectPythonEntrypoint(_framework, workPath, configuredEntrypoint) {
|
|
3858
|
+
const entrypoint = await detectGenericPythonEntrypoint(
|
|
3859
|
+
workPath,
|
|
3860
|
+
configuredEntrypoint
|
|
3861
|
+
);
|
|
3907
3862
|
if (entrypoint)
|
|
3908
3863
|
return entrypoint;
|
|
3909
3864
|
return await getPyprojectEntrypoint(workPath);
|
|
@@ -3985,12 +3940,12 @@ function installGlobalCleanupHandlers() {
|
|
|
3985
3940
|
function createDevAsgiShim(workPath, modulePath) {
|
|
3986
3941
|
try {
|
|
3987
3942
|
const vercelPythonDir = (0, import_path4.join)(workPath, ".vercel", "python");
|
|
3988
|
-
(0,
|
|
3943
|
+
(0, import_fs3.mkdirSync)(vercelPythonDir, { recursive: true });
|
|
3989
3944
|
const shimPath = (0, import_path4.join)(vercelPythonDir, `${ASGI_SHIM_MODULE}.py`);
|
|
3990
3945
|
const templatePath = (0, import_path4.join)(__dirname, "..", `${ASGI_SHIM_MODULE}.py`);
|
|
3991
|
-
const template = (0,
|
|
3946
|
+
const template = (0, import_fs3.readFileSync)(templatePath, "utf8");
|
|
3992
3947
|
const shimSource = template.replace(/__VC_DEV_MODULE_PATH__/g, modulePath);
|
|
3993
|
-
(0,
|
|
3948
|
+
(0, import_fs3.writeFileSync)(shimPath, shimSource, "utf8");
|
|
3994
3949
|
(0, import_build_utils6.debug)(`Prepared Python dev static shim at ${shimPath}`);
|
|
3995
3950
|
return ASGI_SHIM_MODULE;
|
|
3996
3951
|
} catch (err) {
|
|
@@ -4001,12 +3956,12 @@ function createDevAsgiShim(workPath, modulePath) {
|
|
|
4001
3956
|
function createDevWsgiShim(workPath, modulePath) {
|
|
4002
3957
|
try {
|
|
4003
3958
|
const vercelPythonDir = (0, import_path4.join)(workPath, ".vercel", "python");
|
|
4004
|
-
(0,
|
|
3959
|
+
(0, import_fs3.mkdirSync)(vercelPythonDir, { recursive: true });
|
|
4005
3960
|
const shimPath = (0, import_path4.join)(vercelPythonDir, `${WSGI_SHIM_MODULE}.py`);
|
|
4006
3961
|
const templatePath = (0, import_path4.join)(__dirname, "..", `${WSGI_SHIM_MODULE}.py`);
|
|
4007
|
-
const template = (0,
|
|
3962
|
+
const template = (0, import_fs3.readFileSync)(templatePath, "utf8");
|
|
4008
3963
|
const shimSource = template.replace(/__VC_DEV_MODULE_PATH__/g, modulePath);
|
|
4009
|
-
(0,
|
|
3964
|
+
(0, import_fs3.writeFileSync)(shimPath, shimSource, "utf8");
|
|
4010
3965
|
(0, import_build_utils6.debug)(`Prepared Python dev WSGI shim at ${shimPath}`);
|
|
4011
3966
|
return WSGI_SHIM_MODULE;
|
|
4012
3967
|
} catch (err) {
|
|
@@ -4029,7 +3984,7 @@ var startDevServer = async (opts) => {
|
|
|
4029
3984
|
rawEntrypoint
|
|
4030
3985
|
);
|
|
4031
3986
|
if (!entry) {
|
|
4032
|
-
const searched =
|
|
3987
|
+
const searched = PYTHON_CANDIDATE_ENTRYPOINTS.join(", ");
|
|
4033
3988
|
throw new import_build_utils6.NowBuildError({
|
|
4034
3989
|
code: "PYTHON_ENTRYPOINT_NOT_FOUND",
|
|
4035
3990
|
message: `No ${framework} entrypoint found. Add an 'app' script in pyproject.toml or define an entrypoint in one of: ${searched}.`,
|
|
@@ -4105,7 +4060,7 @@ If you are using a virtual environment, activate it before running "vercel dev",
|
|
|
4105
4060
|
}
|
|
4106
4061
|
}
|
|
4107
4062
|
}
|
|
4108
|
-
if (framework
|
|
4063
|
+
if (framework !== "flask") {
|
|
4109
4064
|
const devShimModule = createDevAsgiShim(workPath, modulePath);
|
|
4110
4065
|
if (devShimModule) {
|
|
4111
4066
|
const vercelPythonDir = (0, import_path4.join)(workPath, ".vercel", "python");
|
|
@@ -4114,7 +4069,9 @@ If you are using a virtual environment, activate it before running "vercel dev",
|
|
|
4114
4069
|
}
|
|
4115
4070
|
const moduleToRun = devShimModule || modulePath;
|
|
4116
4071
|
const argv = ["-u", "-m", moduleToRun];
|
|
4117
|
-
(0, import_build_utils6.debug)(
|
|
4072
|
+
(0, import_build_utils6.debug)(
|
|
4073
|
+
`Starting ASGI dev server (${framework}): ${pythonCmd} ${argv.join(" ")}`
|
|
4074
|
+
);
|
|
4118
4075
|
const child = (0, import_child_process.spawn)(pythonCmd, argv, {
|
|
4119
4076
|
cwd: workPath,
|
|
4120
4077
|
env,
|
|
@@ -4279,8 +4236,8 @@ If you are using a virtual environment, activate it before running "vercel dev",
|
|
|
4279
4236
|
};
|
|
4280
4237
|
|
|
4281
4238
|
// src/index.ts
|
|
4282
|
-
var readFile = (0, import_util.promisify)(
|
|
4283
|
-
var writeFile = (0, import_util.promisify)(
|
|
4239
|
+
var readFile = (0, import_util.promisify)(import_fs4.default.readFile);
|
|
4240
|
+
var writeFile = (0, import_util.promisify)(import_fs4.default.writeFile);
|
|
4284
4241
|
var version = 3;
|
|
4285
4242
|
async function downloadFilesInWorkPath({
|
|
4286
4243
|
entrypoint,
|
|
@@ -4325,7 +4282,7 @@ var build = async ({
|
|
|
4325
4282
|
console.log('Failed to create "setup.cfg" file');
|
|
4326
4283
|
throw err;
|
|
4327
4284
|
}
|
|
4328
|
-
if (
|
|
4285
|
+
if ((0, import_build_utils7.isPythonFramework)(framework)) {
|
|
4329
4286
|
const {
|
|
4330
4287
|
cliType,
|
|
4331
4288
|
lockfileVersion,
|
|
@@ -4366,7 +4323,7 @@ var build = async ({
|
|
|
4366
4323
|
}
|
|
4367
4324
|
}
|
|
4368
4325
|
let fsFiles = await (0, import_build_utils7.glob)("**", workPath);
|
|
4369
|
-
if ((
|
|
4326
|
+
if ((0, import_build_utils7.isPythonFramework)(framework) && (!fsFiles[entrypoint] || !entrypoint.endsWith(".py"))) {
|
|
4370
4327
|
const detected = await detectPythonEntrypoint(
|
|
4371
4328
|
config.framework,
|
|
4372
4329
|
workPath,
|
|
@@ -4378,7 +4335,7 @@ var build = async ({
|
|
|
4378
4335
|
);
|
|
4379
4336
|
entrypoint = detected;
|
|
4380
4337
|
} else {
|
|
4381
|
-
const searchedList =
|
|
4338
|
+
const searchedList = PYTHON_CANDIDATE_ENTRYPOINTS.join(", ");
|
|
4382
4339
|
throw new import_build_utils7.NowBuildError({
|
|
4383
4340
|
code: `${framework.toUpperCase()}_ENTRYPOINT_NOT_FOUND`,
|
|
4384
4341
|
message: `No ${framework} entrypoint found. Add an 'app' script in pyproject.toml or define an entrypoint in one of: ${searchedList}.`,
|
|
@@ -4443,7 +4400,7 @@ var build = async ({
|
|
|
4443
4400
|
pythonPath: pythonVersion.pythonPath,
|
|
4444
4401
|
venvPath
|
|
4445
4402
|
});
|
|
4446
|
-
const hasCustomInstallCommand = (
|
|
4403
|
+
const hasCustomInstallCommand = (0, import_build_utils7.isPythonFramework)(framework) && !!projectInstallCommand;
|
|
4447
4404
|
if (hasCustomInstallCommand) {
|
|
4448
4405
|
const baseEnv = spawnEnv || process.env;
|
|
4449
4406
|
const pythonEnv = createVenvEnv(venvPath, baseEnv);
|
|
@@ -4456,7 +4413,7 @@ var build = async ({
|
|
|
4456
4413
|
});
|
|
4457
4414
|
} else {
|
|
4458
4415
|
let ranPyprojectInstall = false;
|
|
4459
|
-
if (
|
|
4416
|
+
if ((0, import_build_utils7.isPythonFramework)(framework)) {
|
|
4460
4417
|
const baseEnv = spawnEnv || process.env;
|
|
4461
4418
|
const pythonEnv = createVenvEnv(venvPath, baseEnv);
|
|
4462
4419
|
pythonEnv.VERCEL_PYTHON_VENV_PATH = venvPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"pip-requirements-js": "1.0.2",
|
|
31
31
|
"smol-toml": "1.5.2",
|
|
32
32
|
"which": "3.0.0",
|
|
33
|
-
"@vercel/build-utils": "13.2.
|
|
33
|
+
"@vercel/build-utils": "13.2.13",
|
|
34
34
|
"@vercel/error-utils": "2.0.3"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|