*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pytz / pytz-2016.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 python3_6 pypy3 )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit distutils-r1
10
11 DESCRIPTION="World timezone definitions for Python"
12 HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18 IUSE=""
19
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         || ( >=sys-libs/timezone-data-2015g sys-libs/glibc[vanilla] )"
23 RDEPEND="${DEPEND}"
24
25 PATCHES=(
26         # Use timezone-data zoneinfo.
27         "${FILESDIR}"/${PN}-2009j-zoneinfo.patch
28         # ...and do not install a copy of it.
29         "${FILESDIR}"/${PN}-2009h-zoneinfo-noinstall.patch
30 )
31
32 python_test() {
33         "${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
34 }