Closed dunkmann00 closed 1 year ago
So I discovered that this issue seems to revolve around the fact that cairocffi
doesn't have a wheel and when pip
tries to build it for PyOxidizer
it has a problem and errors out. I don't really understand why this only happens when building for PyOxidizer
and not when I install it locally with pip
regularly, but that is what is happening.
I did manage to find a simple workaround to this. If I change my pip_install
call to use --use-pep517
when installing the problem dependency, everything works. So in this case:
exe.add_python_resources(exe.pip_install(["--use-pep517", "cariosvg"]))
works without error.
The --use-pep517
flag tells pip
to use the information in pyproject.toml
to first build a wheel for the library and then install from the wheel. I think at some point this will be the default behavior of pip
, so you won't even have to pass this flag in, but for now, adding it seems to be a nice solution.
I'm not sure if there is any interest in trying to figure out why this error happened in the first place, but I'm going to close this issue since the workaround is trivial.
Hello, I was trying to include the library
cairosvg
into my project usingexe.add_python_resources(exe.pip_install(["cairosvg"]))
but was met with an error.cairosvg
has a dependency on cairocffi and this is the library that caused the error when trying to install.To confirm the problem was just with
cairocffi
I changed mybzl
script to try to specifically install onlycairocffi
. Here is the output from trying to build a binary with PyOxidizer:One other thing to note is when I install
cairosvg
locally with pip (version 22.2.2) it works fine.Thanks.