pub fn determine(project_root: impl AsRef<Path>, module_name: &str) -> Result<ProjectLayout> {
        let python_package_dir = project_root.as_ref().join(module_name);
        if python_package_dir.is_dir() {
            if !python_package_dir.join("__init__.py").is_file() {
                bail!("Found a directory with the module name ({}) next to Cargo.toml, which indicates a mixed python/rust project, but the directory didn't contain an __init__.py file.", module_name)
            }

            println!("🍹 Building a mixed python/rust project");

            Ok(ProjectLayout::Mixed(python_package_dir))
        } else {
            Ok(ProjectLayout::PureRust)
        }
    }
/// Checks whether a python module exists besides Cargo.toml with the right name
Checks whether a python module exists besides Cargo.toml with the right name
Checks whether a python module exists besides Cargo . toml with the right name
pub fn determine(project_root: impl AsRef<Path>, module_name: &str) -> Result<ProjectLayout> {
        let python_package_dir = project_root.as_ref().join(module_name);
        if python_package_dir.is_dir() {
            if !python_package_dir.join("__init__.py").is_file() {
                bail!("Found a directory with the module name ({}) next to Cargo.toml, which indicates a mixed python/rust project, but the directory didn't contain an __init__.py file.", module_name)
            }
            println!("🍹 Building a mixed python/rust project");
            Ok(ProjectLayout::Mixed(python_package_dir))
        } else {
            Ok(ProjectLayout::PureRust)
        }
    }
pub fn determine ( project_root : impl AsRef < Path > , module_name : & str ) -> Result < ProjectLayout > { let python_package_dir = project_root . as_ref ( ) . join ( module_name ) ; if python_package_dir . is_dir ( ) { if ! python_package_dir . join ( " " ) . is_file ( ) { bail ! ( " " module_name ) } println ! ( " Ok ( ProjectLayout :: Mixed ( python_package_dir ) ) } else { Ok ( ProjectLayout :: PureRust ) } }
Checks whether a python module exists besides Cargo.toml with the right name
Checks whether a python module exists besides Cargo . toml with the right name
project_root
impl AsRef<Path>
module_name
&str
project_root
impl AsRef<Path>
module_name
&str