Drop $Id$ per council decision in bug #611234.
[gentoo.git] / dev-util / wstool / wstool-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
6
7 SCM=""
8 if [ "${PV#9999}" != "${PV}" ] ; then
9         SCM="git-r3"
10         EGIT_REPO_URI="https://github.com/vcstools/wstool"
11 fi
12
13 inherit ${SCM} distutils-r1
14
15 DESCRIPTION="Commands to manage several local SCM repositories for ROS"
16 HOMEPAGE="http://wiki.ros.org/wstool"
17 if [ "${PV#9999}" != "${PV}" ] ; then
18         SRC_URI=""
19         KEYWORDS=""
20 else
21         SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
22                 https://github.com/vcstools/wstool/archive/${PV}.tar.gz -> ${P}.tar.gz
23         "
24         KEYWORDS="~amd64 ~arm"
25 fi
26
27 LICENSE="BSD"
28 SLOT="0"
29 IUSE="test"
30
31 RDEPEND="
32         dev-python/pyyaml[${PYTHON_USEDEP}]
33         >=dev-python/vcstools-0.1.38[${PYTHON_USEDEP}]
34 "
35 DEPEND="${RDEPEND}
36         dev-python/sphinx
37         test? (
38                 dev-python/nose[${PYTHON_USEDEP}]
39                 dev-python/coverage[${PYTHON_USEDEP}]
40                 dev-vcs/git
41                 dev-vcs/bzr
42                 dev-vcs/mercurial
43                 dev-vcs/subversion
44         )
45 "
46
47 PATCHES=( "${FILESDIR}/prefix2.patch" )
48 DISTUTILS_IN_SOURCE_BUILD="yes"
49
50 python_test() {
51         # From travis.yml
52         # Set git config to silence some stuff in the tests
53         git config --global user.email "foo@example.com"
54         git config --global user.name "Foo Bar"
55         # Set the hg user
56         echo -e "[ui]\nusername = Your Name <your@mail.com>" >> ~/.hgrc
57         # Set the bzr user
58         bzr whoami "Your Name <name@example.com>"
59         # command to run tests
60         nosetests --with-coverage --cover-package=wstool || die
61 }