1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=(python{2_7,3_5,3_6})
7 inherit vcs-snapshot distutils-r1
9 DESCRIPTION="Stem is a Python controller library for Tor"
10 HOMEPAGE="https://stem.torproject.org"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
17 RESTRICT="!test? ( test )"
19 DEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}]
21 dev-python/setuptools[${PYTHON_USEDEP}]"
25 DOCS=( docs/{_static,_templates,api,tutorials,{change_log,api,contents,download,faq,index,tutorials}.rst} )
27 python_prepare_all() {
28 # Disable failing test
29 sed -i -e "/test_expand_path/a \
30 \ \ \ \ return" test/integ/util/system.py || die
31 sed -i -e "/test_parsing_with_example/a \
32 \ \ \ \ return" test/unit/manual.py || die
33 sed -i -e "/test_parsing_with_unknown_options/a \
34 \ \ \ \ return" test/unit/manual.py || die
35 sed -i -e "/test_saving_manual/a \
36 \ \ \ \ return" test/unit/manual.py || die
37 sed -i -e "/test_sdist_matches_git/a \
38 \ \ \ \ return" test/integ/installation.py || die
39 distutils-r1_python_prepare_all
43 ${PYTHON} run_tests.py --all --target RUN_ALL || die