pip should be executed via the regular python executable (#913)
Fixes #910
This commit is contained in:
committed by
GitHub
parent
6158a17ba8
commit
5d168bbf0d
30
.vscode/launch.json
vendored
30
.vscode/launch.json
vendored
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
"type": "lldb",
|
"type": "lldb",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Debug executable 'topgrade'",
|
"name": "Topgrade",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"args": [
|
"args": [
|
||||||
@@ -20,27 +20,19 @@
|
|||||||
"kind": "bin"
|
"kind": "bin"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"args": [],
|
"args": [
|
||||||
|
"--only",
|
||||||
|
"${input:step}",
|
||||||
|
"-v"
|
||||||
|
],
|
||||||
"cwd": "${workspaceFolder}"
|
"cwd": "${workspaceFolder}"
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
{
|
{
|
||||||
"type": "lldb",
|
"type": "promptString",
|
||||||
"request": "launch",
|
"id": "step",
|
||||||
"name": "Debug unit tests in executable 'topgrade'",
|
"description": "step nname",
|
||||||
"cargo": {
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--no-run",
|
|
||||||
"--bin=topgrade",
|
|
||||||
"--package=topgrade"
|
|
||||||
],
|
|
||||||
"filter": {
|
|
||||||
"name": "topgrade",
|
|
||||||
"kind": "bin"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"args": [],
|
|
||||||
"cwd": "${workspaceFolder}"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,12 @@ pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_pip3_update(run_type: RunType) -> Result<()> {
|
pub fn run_pip3_update(run_type: RunType) -> Result<()> {
|
||||||
let pip3 = utils::require("pip3")?;
|
let python3 = utils::require("python3")?;
|
||||||
|
Command::new(&python3)
|
||||||
|
.args(&["-m", "pip"])
|
||||||
|
.check_output()
|
||||||
|
.map_err(|_| SkipStep("pip does not exists".to_string()))?;
|
||||||
|
|
||||||
print_separator("pip3");
|
print_separator("pip3");
|
||||||
if std::env::var("VIRTUAL_ENV").is_ok() {
|
if std::env::var("VIRTUAL_ENV").is_ok() {
|
||||||
print_warning("This step is will be skipped when running inside a virtual environment");
|
print_warning("This step is will be skipped when running inside a virtual environment");
|
||||||
@@ -271,8 +276,8 @@ pub fn run_pip3_update(run_type: RunType) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_type
|
run_type
|
||||||
.execute(&pip3)
|
.execute(&python3)
|
||||||
.args(&["install", "--upgrade", "--user", "pip"])
|
.args(&["-m", "pip", "install", "--upgrade", "--user", "pip"])
|
||||||
.check_run()
|
.check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user