Skip to content

Commit

Permalink
Fix maturn develop for PyPy on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Jul 19, 2021
1 parent d257dbb commit 907973e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/target.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::python_interpreter::InterpreterKind;
use crate::{PlatformTag, PythonInterpreter};
use anyhow::{bail, format_err, Context, Result};
use platform_info::*;
Expand Down Expand Up @@ -316,13 +317,17 @@ impl Target {
interpreter: &PythonInterpreter,
) -> PathBuf {
if self.is_unix() {
let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor);

venv_base
.as_ref()
.join("lib")
.join(python_dir)
.join("site-packages")
match interpreter.interpreter_kind {
InterpreterKind::CPython => {
let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor);
venv_base
.as_ref()
.join("lib")
.join(python_dir)
.join("site-packages")
}
InterpreterKind::PyPy => venv_base.as_ref().join("site-packages"),
}
} else {
venv_base.as_ref().join("Lib").join("site-packages")
}
Expand Down

0 comments on commit 907973e

Please sign in to comment.