1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
9 DESCRIPTION="Let your Python tests travel through time"
10 HOMEPAGE="https://github.com/spulec/freezegun"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15 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"
19 >dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
20 dev-python/six[${PYTHON_USEDEP}]
23 dev-python/setuptools[${PYTHON_USEDEP}]
25 $(python_gen_impl_dep sqlite)
26 dev-python/mock[${PYTHON_USEDEP}]
27 dev-python/nose[${PYTHON_USEDEP}]
32 # pulled from upstream git, will be in next release
33 "${FILESDIR}/freezegun-0.3.12-py38.patch"
36 "${FILESDIR}/freezegun-0.3.12-tests.patch"
39 distutils_enable_tests pytest
41 python_prepare_all() {
43 -e 's:(python-dateutil)>=2.0:\1:' \
44 -e "s:'(python-dateutil)>=[0-9.]+,.+':'\1':" \
47 distutils-r1_python_prepare_all
51 # optional and only works with python3
52 if ! python_is_python3; then
53 rm ${PN}/_async.py || die