[Python-modules-team] Bug#919008: python3-pdfminer: should depend on python3-pycryptodome, not recommend python3-crypto

Daniele Tricoli eriol at mornie.org
Sat Jan 12 22:45:53 GMT 2019

Hello Sean,

On 12/01/2019 17:28, Sean Whitton wrote:
> I think that you need to patch the pdfminer code, then, because it looks
> like it is trying to load pycryptodome, rather than pycrypto.
> OCRmyPDF is currently patched not to use pdfminer at all, but before
> that, I was seeing this:
>     spwhitton at develacc:~>ocrmypdf --version
>     Traceback (most recent call last):
>       File "/usr/bin/ocrmypdf", line 6, in <module>
>         from pkg_resources import load_entry_point
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3126, in <module>
>         @_call_aside
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3110, in _call_aside
>         f(*args, **kwargs)
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
>         working_set = WorkingSet._build_master()
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 581, in _build_master
>         ws.require(__requires__)
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 898, in require
>         needed = self.resolve(parse_requirements(requirements))
>       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 784, in resolve
>         raise DistributionNotFound(req, requirers)
>     pkg_resources.DistributionNotFound: The 'pycryptodome' distribution was not found and is required by pdfminer.six
> i.e. when OCRmyPDF tries to load pdfminer.six, pdfminer.six tries to
> load pycryptodome.
> Let me know what you decide to do, as it might be possible to reenable
> pdfminer.six in OCRmyPDF.

Thanks for spotting this, I patched pdfminer and removed pycryptodome from
install_require, since it's not used, and it's not really required.

Just uploaded the new revision, now pgk_resource seems is fine:

>>> import pkg_resources
>>> pkg_resources.require(['pdfminer.six'])
[pdfminer.six 20181108 (/usr/lib/python3/dist-packages)]

Kind regards,

  Daniele Tricoli 'eriol'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20190112/072c3e0d/attachment.sig>

More information about the Python-modules-team mailing list