Closed baseplate-admin closed 1 month ago
I don't really get it, can you provide a simple Rust code snippet and an SVG that when run allows us to reproduce it on the Rust side?
If that issue only happens with Python then there isn't much we can do here, I think, since resvg-py
is an unaffiliated project.
I don't really get it, can you provide a simple Rust code snippet and an SVG that when run allows us to reproduce it on the Rust side?
the issue is on rust
side, resvg fails to parse the svg only in mac
, but works fine in windows
/linux
. That's what is bothering me.
But i will try to do a minimal reproduction of this issue. It is near impossible for me as i dont have access to a macbook
Can you provide/print that acid.svg
. It seems like the string you're trying to parse is messed up somewhere on your side.
Can you provide/print that acid.svg.
Sure thing : https://github.com/baseplate-admin/resvg-py/blob/34c7e6065edead9f8e7aaa97341615db8b78677a/tests/acid.svg
It seems like the string you're trying to parse is messed up somewhere on your side.
I am really at a loss here, i dont have any way of testing on macos
and it's not reproducible in my environment. Could you please tell me if i can help you in any way from windows/linux?
I do use macos, so if you can tell me how to run it locally - I will try.
I do use macos, so if you can tell me how to run it locally - I will try.
These are the steps i took on linux to get this repository running
First install python
pip install pipx
pipx install maturin poetry
git clone https://github.com/baseplate-admin/resvg-py
poetry install
poetry shell
maturin develop
pytest .
Hi @RazrFalcon,
Sorry for bothering you with this issue.
Turns out this is a bug with python on macos..
Thank you all for helping me initially
What's the bug? Out of curiosity.
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.
Initial findings by this comment:
Which led me to this issue with pip
:
References :
Good. No problem.
Hi i have this following code
rust:
python:
This fails in
macos
but runs in all other OS.Here is the log : https://github.com/baseplate-admin/resvg-py/actions/runs/8889901090/job/24409004312 Relevant Source :
Rust : https://github.com/baseplate-admin/resvg-py/blob/4a89a841138d3297986892e6418c777fb068c140/src/rust/lib.rs#L164-L178
Python : https://github.com/baseplate-admin/resvg-py/blob/e981e211fccd43cf0581d870e0fdfb3187667023/tests/test_path.py#L1-L22
Discussion on pyo3: https://github.com/PyO3/pyo3/discussions/4137#discussion-6584195
Discussion on reddit : https://www.reddit.com/r/learnrust/comments/1cgpe9d/stdpathpathnewexists_with_python_pathlibpath