dev-python/kombu: 4.6.8 allarches stablized
[gentoo.git] / dev-python / certifi / certifi-2020.4.5.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
7
8 inherit distutils-r1 prefix readme.gentoo-r1
9
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"
13
14 LICENSE="MPL-2.0"
15 SLOT="0"
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"
17 IUSE=""
18
19 RDEPEND="app-misc/ca-certificates"
20 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
21
22 # Do not drop this patch -- this will affect system's security
23 PATCHES=( "${FILESDIR}"/${PN}-2020.4.5.1-use-system-cacerts.patch )
24
25 python_prepare_all() {
26         distutils-r1_python_prepare_all
27
28         # Precaution -- nothing should use bundled CA certificates
29         rm certifi/cacert.pem || die "Failed to delete bundled CA certificates"
30
31         eprefixify certifi/core.py
32 }
33
34 python_install_all() {
35         distutils-r1_python_install_all
36
37         local DOC_CONTENTS="
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.
41         "
42         readme.gentoo_create_doc
43 }