Rust read fails in mac but not linux and windows

Hi i have this following code:

I have a strong suspicion that this not not related to python

rust:

    let svg_string: String;

    if std::path::Path::new(&svg).exists() {
        let mut svg_data = std::fs::read(svg)
            .map_err(|_| "failed to open the provided file")
            .unwrap();
        if svg_data.starts_with(&[0x1f, 0x8b]) {
            svg_data = resvg::usvg::decompress_svgz(&svg_data)
                .map_err(|e| e.to_string())
                .unwrap();
        };
        svg_string = std::str::from_utf8(&svg_data).unwrap().to_owned();
    } else {
        svg_string = svg;
    }



def test_path():
    path = os.path.join(BASE_DIR, "acid.svg")
    base = resvg_py.svg_to_base64()
    print(path)
    assert base == svg_output


def test_gzip_path():
    path = os.path.join(BASE_DIR, "acid.svg.gz")
    base = resvg_py.svg_to_base64()
    print(path)

    assert base == svg_output

This fails in macos.

Here is the log : Merge branch 'master' of https://github.com/baseplate-admin/resvg-py · baseplate-admin/resvg-py@fafc60e · GitHub
Relevant Source :

The problem is with pip itself.

The problem is with pip preferring PYPI over local package in macos. So essentially what i wrote in current package, even if i bumped the version would not be used.

Here is the explaination

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.