*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / rospkg / rospkg-1.1.9.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python{2_7,3_6} pypy3 )
6
7 SCM=""
8 if [ "${PV#9999}" != "${PV}" ] ; then
9         SCM="git-r3"
10         EGIT_REPO_URI="https://github.com/ros-infrastructure/rospkg"
11 fi
12
13 inherit ${SCM} distutils-r1
14
15 DESCRIPTION="Standalone Python library for the ROS package system"
16 HOMEPAGE="http://wiki.ros.org/rospkg"
17 if [ "${PV#9999}" != "${PV}" ] ; then
18         SRC_URI=""
19         KEYWORDS=""
20         # Needed for tests
21         S="${WORKDIR}/${PN}"
22         EGIT_CHECKOUT_DIR="${S}"
23 else
24         SRC_URI="https://github.com/ros-infrastructure/rospkg/archive/${PV}.tar.gz -> ${P}.tar.gz"
25         KEYWORDS="~amd64 ~arm"
26 fi
27
28 LICENSE="BSD"
29 SLOT="0"
30 IUSE="test"
31 RESTRICT="!test? ( test )"
32
33 RDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]"
34 BDEPEND="
35         dev-python/setuptools[${PYTHON_USEDEP}]
36         test? (
37                 dev-python/nose[${PYTHON_USEDEP}]
38         )"
39 DEPEND="${RDEPEND} ${BDEPEND}
40         test? (
41                 dev-python/coverage[${PYTHON_USEDEP}]
42                 dev-python/mock[${PYTHON_USEDEP}]
43         )
44 "
45 PATCHES=( "${FILESDIR}/gentoo.patch" )
46
47 python_test() {
48         nosetests --with-coverage --cover-package=rospkg --with-xunit test || die
49 }