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 )
10 DESCRIPTION="Extensions to the standard Python datetime module"
12 https://dateutil.readthedocs.org/
13 https://pypi.org/project/python-dateutil
14 https://github.com/dateutil/dateutil/
16 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
20 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"
22 RESTRICT="!test? ( test )"
25 >=dev-python/six-1.5[${PYTHON_USEDEP}]
26 sys-libs/timezone-data
29 dev-python/setuptools_scm[${PYTHON_USEDEP}]
30 dev-python/setuptools[${PYTHON_USEDEP}]
32 dev-python/pytest[${PYTHON_USEDEP}]
33 dev-python/freezegun[${PYTHON_USEDEP}]
34 dev-python/hypothesis[${PYTHON_USEDEP}]
38 python_prepare_all() {
40 "${FILESDIR}"/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch
43 # don't install zoneinfo tarball
44 sed -i '/package_data=/d' setup.py || die
46 distutils-r1_python_prepare_all
50 py.test -v || die "Tests failed under ${EPYTHON}"