Skip to content

Commit

Permalink
do not compile pyc on win
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Oct 3, 2024
1 parent ebb2a6c commit d516266
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/example-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- os: macos-latest
activate-environment: /tmp/anaconda-client-env
- os: windows-latest
activate-environment: c:\ace
activate-environment: D:\ace
defaults:
run:
shell: bash -el {0}
Expand Down
13 changes: 9 additions & 4 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47271,9 +47271,14 @@ exports.isMambaInstalled = isMambaInstalled;
function condaCommand(cmd, options) {
return __awaiter(this, void 0, void 0, function* () {
const command = [condaExecutable(options, cmd[0]), ...cmd];
const env = options.useMamba
? { MAMBA_ROOT_PREFIX: condaBasePath(options) }
: {};
let env = {};
if (options.useMamba) {
env.MAMBA_ROOT_PREFIX = condaBasePath(options);
if (constants.IS_WINDOWS) {
// mamba v2 hangs on Windows during this phase
env.MAMBA_COMPILE_PYC = "false";
}
}
return yield utils.execute(command, env);
});
}
Expand Down Expand Up @@ -48052,7 +48057,7 @@ exports.ensureYaml = {
else {
subcommand = "update";
}
return ["env", subcommand, flag, nameOrPath, "--file", envFile, "-vvv"];
return ["env", subcommand, flag, nameOrPath, "--file", envFile];
}),
};

Expand Down
11 changes: 8 additions & 3 deletions src/conda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ export async function condaCommand(
options: types.IDynamicOptions,
): Promise<void> {
const command = [condaExecutable(options, cmd[0]), ...cmd];
const env = options.useMamba
? { MAMBA_ROOT_PREFIX: condaBasePath(options) }
: {};
let env: { [key: string]: string } = {};
if (options.useMamba) {
env.MAMBA_ROOT_PREFIX = condaBasePath(options);
if (constants.IS_WINDOWS) {
// mamba v2 hangs on Windows during this phase
env.MAMBA_COMPILE_PYC = "false";
}
}
return await utils.execute(command, env);
}

Expand Down
2 changes: 1 addition & 1 deletion src/env/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ export const ensureYaml: types.IEnvProvider = {
} else {
subcommand = "update";
}
return ["env", subcommand, flag, nameOrPath, "--file", envFile, "-vvv"];
return ["env", subcommand, flag, nameOrPath, "--file", envFile];
},
};

0 comments on commit d516266

Please sign in to comment.