71614a75532450900b2d2dcfe5da8fa9c087fde5
[gentoo.git] / dev-python / memory_profiler / memory_profiler-0.54.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="A module for monitoring memory usage of a python program"
11 HOMEPAGE="https://pypi.org/project/memory_profiler/ https://github.com/fabianp/memory_profiler"
12 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17
18 # dev-lang/mercury: collision on 'mprof'
19 # https://bugs.gentoo.org/571176
20 RDEPEND="
21         dev-python/psutil[${PYTHON_USEDEP}]
22         !dev-lang/mercury
23 "
24 DEPEND="${RDEPEND}
25         dev-python/setuptools[${PYTHON_USEDEP}]"
26
27 python_test() {
28         ${EPYTHON} -m memory_profiler test/test_func.py || die
29         ${EPYTHON} -m memory_profiler test/test_loop.py || die
30         ${EPYTHON} -m memory_profiler test/test_as.py || die
31         ${EPYTHON} -m memory_profiler test/test_global.py || die
32         ${EPYTHON} -m memory_profiler test/test_precision_command_line.py || die
33         ${EPYTHON} -m memory_profiler test/test_gen.py || die
34         if python_is_python3; then
35                 ${EPYTHON} -m memory_profiler test/test_unicode.py || die
36         fi
37         ${EPYTHON} test/test_tracemalloc.py || die
38         ${EPYTHON} test/test_import.py || die
39         ${EPYTHON} test/test_memory_usage.py || die
40         ${EPYTHON} test/test_precision_import.py || die
41 }