Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696224 - dev-python/cryptography should depend on dev-python/cffi - pkg_resources.DistributionNotFound: The 'cffi!=1.11.3,>=1.8' distribution was not found and is required by cryptography
Summary: dev-python/cryptography should depend on dev-python/cffi - pkg_resources.Dist...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
Depends on:
Reported: 2019-10-04 15:19 UTC by Nuno
Modified: 2020-01-09 18:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Nuno 2019-10-04 15:19:44 UTC
Currently, dev-python/cryptography only has a DEPEND on dev-python/cffi.
However, it needs it on runtime.

For example, here's certbot trying to use cryptography without dev-python/cffi installed (dev-python/cryptography was installed as a binary package and therefore did not pull in cffi):

host ~ # certbot certificates
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/certbot", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 3126, in <module>
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 581, in _build_master
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python3.6/site-packages/pkg_resources/", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cffi!=1.11.3,>=1.8' distribution was not found and is required by cryptography

Manually installing dev-python/cffi words solves the issue.

- dev-python/cryptography-2.6.1 (also checked 2.7)
- dev-python/cffi-1.11.4
- app-crypt/certbot-0.38.0
Comment 1 Matt Turner gentoo-dev 2019-12-07 16:24:59 UTC
Seems like cffi should be listed in cryptography's RDEPEND, not just in DEPEND.
Comment 2 Larry the Git Cow gentoo-dev 2020-01-09 18:04:18 UTC
The bug has been closed via the following commit(s):

commit 484ac3d510a71d0c47a2841d06dd79cb5a34b202
Author:     Mike Gilbert <>
AuthorDate: 2020-01-09 18:03:32 +0000
Commit:     Mike Gilbert <>
CommitDate: 2020-01-09 18:04:14 +0000

    dev-python/cryptography: add cffi to RDEPEND
    cryptography installs egg-info/requires.txt containing cffi. This means
    packages using pkg_resources to import cryptography will fail if cffi is not
    installed at runtime.
    Package-Manager: Portage-2.3.84_p2, Repoman-2.3.20_p24
    Signed-off-by: Mike Gilbert <>

 .../{cryptography-2.6.1.ebuild => cryptography-2.6.1-r1.ebuild}       | 4 ++--
 .../{cryptography-2.8.ebuild => cryptography-2.8-r1.ebuild}           | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)