Skip to content

Commit d516266

Browse files
committed
do not compile pyc on win
1 parent ebb2a6c commit d516266

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/workflows/example-6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- os: macos-latest
4040
activate-environment: /tmp/anaconda-client-env
4141
- os: windows-latest
42-
activate-environment: c:\ace
42+
activate-environment: D:\ace
4343
defaults:
4444
run:
4545
shell: bash -el {0}

dist/setup/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47271,9 +47271,14 @@ exports.isMambaInstalled = isMambaInstalled;
4727147271
function condaCommand(cmd, options) {
4727247272
return __awaiter(this, void 0, void 0, function* () {
4727347273
const command = [condaExecutable(options, cmd[0]), ...cmd];
47274-
const env = options.useMamba
47275-
? { MAMBA_ROOT_PREFIX: condaBasePath(options) }
47276-
: {};
47274+
let env = {};
47275+
if (options.useMamba) {
47276+
env.MAMBA_ROOT_PREFIX = condaBasePath(options);
47277+
if (constants.IS_WINDOWS) {
47278+
// mamba v2 hangs on Windows during this phase
47279+
env.MAMBA_COMPILE_PYC = "false";
47280+
}
47281+
}
4727747282
return yield utils.execute(command, env);
4727847283
});
4727947284
}
@@ -48052,7 +48057,7 @@ exports.ensureYaml = {
4805248057
else {
4805348058
subcommand = "update";
4805448059
}
48055-
return ["env", subcommand, flag, nameOrPath, "--file", envFile, "-vvv"];
48060+
return ["env", subcommand, flag, nameOrPath, "--file", envFile];
4805648061
}),
4805748062
};
4805848063

src/conda.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,14 @@ export async function condaCommand(
106106
options: types.IDynamicOptions,
107107
): Promise<void> {
108108
const command = [condaExecutable(options, cmd[0]), ...cmd];
109-
const env = options.useMamba
110-
? { MAMBA_ROOT_PREFIX: condaBasePath(options) }
111-
: {};
109+
let env: { [key: string]: string } = {};
110+
if (options.useMamba) {
111+
env.MAMBA_ROOT_PREFIX = condaBasePath(options);
112+
if (constants.IS_WINDOWS) {
113+
// mamba v2 hangs on Windows during this phase
114+
env.MAMBA_COMPILE_PYC = "false";
115+
}
116+
}
112117
return await utils.execute(command, env);
113118
}
114119

src/env/yaml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ export const ensureYaml: types.IEnvProvider = {
138138
} else {
139139
subcommand = "update";
140140
}
141-
return ["env", subcommand, flag, nameOrPath, "--file", envFile, "-vvv"];
141+
return ["env", subcommand, flag, nameOrPath, "--file", envFile];
142142
},
143143
};

0 commit comments

Comments
 (0)