Skip to content

Commit

Permalink
Force package lock creation for stubborn projects with .npmrc
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Dec 12, 2024
1 parent 5b05732 commit 243b7c3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
43 changes: 21 additions & 22 deletions lib/stages/pregen/pregen.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,28 @@ export function preparePythonEnv(_filePath, options) {
);
}
}
for (const pt of options.projectType) {
for (const pyversion of [
"python36",
"python38",
"python39",
"python310",
"python311",
"python312",
]) {
if (
options.projectType.includes(pyversion) &&
!process.env.PIP_INSTALL_ARGS
) {
const tempDir = mkdtempSync(join(tmpdir(), "cdxgen-pip-"));
const py_version_number = pyversion.replace("python3", "3.");
process.env.PIP_INSTALL_ARGS = `--python-version ${py_version_number} --ignore-requires-python --no-warn-conflicts --only-binary=:all:`;
process.env.PIP_TARGET = tempDir;
if (DEBUG_MODE) {
console.log("PIP_INSTALL_ARGS set to", process.env.PIP_INSTALL_ARGS);
console.log("PIP_TARGET set to", process.env.PIP_TARGET);
}
break;
for (const pyversion of [
"python36",
"python38",
"python39",
"python310",
"python311",
"python312",
"python313",
]) {
if (
options.projectType.includes(pyversion) &&
!process.env.PIP_INSTALL_ARGS
) {
const tempDir = mkdtempSync(join(tmpdir(), "cdxgen-pip-"));
const py_version_number = pyversion.replace("python3", "3.");
process.env.PIP_INSTALL_ARGS = `--python-version ${py_version_number} --ignore-requires-python --no-warn-conflicts --only-binary=:all:`;
process.env.PIP_TARGET = tempDir;
if (DEBUG_MODE) {
console.log("PIP_INSTALL_ARGS set to", process.env.PIP_INSTALL_ARGS);
console.log("PIP_TARGET set to", process.env.PIP_TARGET);
}
break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion types/lib/stages/pregen/pregen.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 243b7c3

Please sign in to comment.