CYGWIN install without pikepdf #169
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I found a way to install img2pdf on CYGWIN (without pikepdf), and I wanted to share, for anyone who come across this issue, searching a solution:
My problems: I try to install img2pdf on CYGWIN, with pip. But Pillow (python39-imaging), QPDF, lxml (python39-lxml), and others are not recognized when I try to install a package which depends on them, and pip try to build them in vain. When I open an interpreter, I can import them, but pip apparently not. I found this solution, but if anyone known the true solution, please share.
EDIT 1: I forgot to add "install" after "apt-cyg"
EDIT 2: I just found out. pikepdf requires "Pillow>=9.0", "lxml>=4.8" and 'QPDF_MIN_VERSION = "11.2.0"'. But they are not updated in the CYGWIN repository. So, if you want to install img2pdf on CYGWIN, or on any distros with outdated dependencies, just make sure Pillow is installed and accessible on the same python version, and install img2pdf without its dependencies.
Maybe, the dependency pikepdf can be marked as "not mandatory" ? I do not known how it could be done in the setup.py file.
EDIT 3: Nevermind. The only way would be to add pikepdf as an optional dependency, which I am sure, is not the best solution, because it could affect negatively most platforms, to only support some platforms.
The solution for some platforms:
It would be good in my opinion if it was written somewhere, in a wiki for example, because the minimal versions required by pikepdf are quite high.
I'm unsure what the best way forward is. Indeed pikepdf is not mandatory and img2pdf will work without it but produce slightly worse output. I'd like to see a solution where pikepdf is still installed by default on the platforms where it's available but make it possible to not install it on the others. Having to use
--no-deps
is not a good solution. But I also do not like that utilizingEXTRAS_REQUIRE
insetup.py
would mean that most people would have to run:The default should be to add pikepdf and it should take extra steps not to have it -- not the other way round. Is this possible somehow with setuptools?
@josch
I do not think so. Maybe with some complex programming in the setup.py file ? I think this limitation in pip is wanted by the developers. I think your initial choice of integrating it by default is the best.
I am closing my issue with your agreement.