pub fn venv(target: &Target, venv_dir: &Path, bridge: &BridgeModel) -> Result<Self> {
        let interpreter = PythonInterpreter::check_executable(
            target.get_venv_python(&venv_dir),
            &target,
            &bridge,
        )?
        .ok_or_else(|| {
            anyhow!("Expected `python` to be a python interpreter inside a virtualenv ಠ_ಠ")
        })?;

        let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor);

        let base_path = if target.is_unix() {
            venv_dir.join("lib").join(python_dir).join("site-packages")
        } else {
            venv_dir.join("Lib").join("site-packages")
        };

        Ok(PathWriter {
            base_path,
            record: Vec::new(),
        })
    }
/// Creates a [ModuleWriter] that adds the modul to the current virtualenv
Creates a [ModuleWriter] that adds the modul to the current virtualenv
Creates a [ ModuleWriter ] that adds the modul to the current virtualenv
pub fn venv(target: &Target, venv_dir: &Path, bridge: &BridgeModel) -> Result<Self> {
        let interpreter = PythonInterpreter::check_executable(
            target.get_venv_python(&venv_dir),
            &target,
            &bridge,
        )?
        .ok_or_else(|| {
            anyhow!("Expected `python` to be a python interpreter inside a virtualenv ಠ_ಠ")
        })?;
        let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor);
        let base_path = if target.is_unix() {
            venv_dir.join("lib").join(python_dir).join("site-packages")
        } else {
            venv_dir.join("Lib").join("site-packages")
        };
        Ok(PathWriter {
            base_path,
            record: Vec::new(),
        })
    }
pub fn venv ( target : & Target , venv_dir : & Path , bridge : & BridgeModel ) -> Result < Self > { let interpreter = PythonInterpreter :: check_executable ( target . get_venv_python ( & venv_dir ) , & target , & bridge , ) ? . ok_or_else ( | | { anyhow ! ( " } ) ? ; let python_dir = format ! ( " " interpreter major interpreter minor ) ; let base_path = if target . is_unix ( ) { venv_dir . join ( " " ) . join ( python_dir ) . join ( " " ) } else { venv_dir . join ( " " ) . join ( " " ) } ; Ok ( PathWriter { base_path , record : Vec :: new ( ) , } ) }
Creates a [ModuleWriter] that adds the modul to the current virtualenv
Creates a [ ModuleWriter ] that adds the modul to the current virtualenv
target
&Target
venv_dir
&Path
bridge
&BridgeModel
target
&Target
venv_dir
&Path
bridge
&BridgeModel