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,8,9} pypy3 )
8 inherit distutils-r1 prefix readme.gentoo-r1
10 DESCRIPTION="Python package for providing Mozilla's CA Bundle"
11 HOMEPAGE="https://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 ~riscv s390 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}"/${PN}-2020.4.5.1-use-system-cacerts.patch )
25 python_prepare_all() {
26 distutils-r1_python_prepare_all
28 # Precaution -- nothing should use bundled CA certificates
29 rm certifi/cacert.pem || die "Failed to delete bundled CA certificates"
31 eprefixify certifi/core.py
34 python_install_all() {
35 distutils-r1_python_install_all
38 In Gentoo, we don't use certifi's bundled CA certificates.
39 Instead we remove bundled cacert.pem and patch certifi
40 to return system's CA certificates.
42 readme.gentoo_create_doc