@vercel/python 2.1.2-canary.1 → 2.1.2-canary.5

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -9
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -3715,7 +3715,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3715
3715
  };
3716
3716
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3717
3717
  exports.installRequirementsFile = exports.installRequirement = void 0;
3718
- const path_1 = __webpack_require__(622);
3719
3718
  const execa_1 = __importDefault(__webpack_require__(580));
3720
3719
  const build_utils_1 = __webpack_require__(445);
3721
3720
  const makeDependencyCheckCode = (dependency) => `
@@ -3798,14 +3797,10 @@ async function installRequirement({ pythonPath, pipPath, dependency, version, wo
3798
3797
  }
3799
3798
  exports.installRequirement = installRequirement;
3800
3799
  async function installRequirementsFile({ pythonPath, pipPath, filePath, workPath, meta, args = [], }) {
3801
- const fileAtRoot = path_1.relative(workPath, filePath) === path_1.basename(filePath);
3802
- // If the `requirements.txt` file is located in the Root Directory of the project and
3803
- // the new File System API is used (`avoidTopLevelInstall`), the Install Command
3804
- // will have already installed its dependencies, so we don't need to do it again.
3805
- if (meta.avoidTopLevelInstall && fileAtRoot) {
3806
- build_utils_1.debug(`Skipping requirements file installation, already installed by Install Command`);
3807
- return;
3808
- }
3800
+ // The Vercel platform already handles `requirements.txt` for frontend projects,
3801
+ // but the installation logic there is different, because it seems to install all
3802
+ // of the dependencies globally, whereas, for this Runtime, we want it to happen only
3803
+ // locally, so we'll run a separate installation.
3809
3804
  if (meta.isDev &&
3810
3805
  (await areRequirementsInstalled(pythonPath, filePath, workPath))) {
3811
3806
  build_utils_1.debug(`Skipping requirements file installation, already installed`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "2.1.2-canary.1",
3
+ "version": "2.1.2-canary.5",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -20,9 +20,10 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/execa": "^0.9.0",
23
+ "@vercel/build-utils": "2.13.1-canary.2",
23
24
  "@vercel/ncc": "0.24.0",
24
25
  "execa": "^1.0.0",
25
26
  "typescript": "4.3.4"
26
27
  },
27
- "gitHead": "1202ff7b2b8a821c6404a86baa12996f3078ed36"
28
+ "gitHead": "28f3bf9ef6e492156eb127c7cbdcbfcfeafdf7e4"
28
29
  }