1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} pypy3 )
8 inherit distutils-r1 prefix readme.gentoo-r1
10 DESCRIPTION="Python package for providing Mozilla's CA Bundle"
11 HOMEPAGE="http://certifi.io/ https://pypi.org/project/certifi"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
19 RDEPEND="app-misc/ca-certificates"
20 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
22 # Do not drop this patch -- this will affect system's security
23 PATCHES=( "${FILESDIR}"/certifi-2018.4.16-use-system-cacerts.patch )
25 python_prepare_all() {
26 distutils-r1_python_prepare_all
28 eprefixify certifi/core.py
31 python_install_all() {
32 distutils-r1_python_install_all
35 In Gentoo, we don't use certifi's bundled CA certificates.
36 Instead we remove bundled cacert.pem and patch certifi
37 to return system's CA certificates.
39 readme.gentoo_create_doc
41 # Precaution -- nothing should use bundled CA certificates
42 find "${D}" -name 'cacert.pem' -delete || die "Failed to delete bundled CA certificates"