72ac15e0bbed9141eabd563f2b95ea59d03a0287
[gentoo.git] / dev-python / memory_profiler / memory_profiler-0.47.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
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 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         dev-python/psutil[${PYTHON_USEDEP}]
22 "
23 DEPEND="${RDEPEND}
24         dev-python/setuptools[${PYTHON_USEDEP}]"
25
26 python_test() {
27         ${EPYTHON} -m memory_profiler test/test_func.py || die
28         ${EPYTHON} -m memory_profiler test/test_loop.py || die
29         ${EPYTHON} -m memory_profiler test/test_as.py || die
30         ${EPYTHON} -m memory_profiler test/test_global.py || die
31         ${EPYTHON} -m memory_profiler test/test_precision_command_line.py || die
32         ${EPYTHON} -m memory_profiler test/test_gen.py || die
33         if python_is_python3; then
34                 ${EPYTHON} -m memory_profiler test/test_unicode.py || die
35         fi
36         ${PYTHON} test/test_tracemalloc.py || die
37         ${EPYTHON} test/test_import.py || die
38         ${EPYTHON} test/test_memory_usage.py || die
39         ${EPYTHON} test/test_precision_import.py || die
40 }