Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/vcstools/
Date: Sun, 26 Sep 2021 17:45:30
Message-Id: 1632678311.6851dd2506a943e2a3a7ebae29b441655f657f92.arthurzam@gentoo
1 commit: 6851dd2506a943e2a3a7ebae29b441655f657f92
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 26 17:39:30 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 26 17:45:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6851dd25
7
8 dev-python/vcstools: enable py3.9, enable py3.10
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/vcstools/vcstools-0.1.42.ebuild | 56 ++++++++++++++----------------
13 1 file changed, 27 insertions(+), 29 deletions(-)
14
15 diff --git a/dev-python/vcstools/vcstools-0.1.42.ebuild b/dev-python/vcstools/vcstools-0.1.42.ebuild
16 index 08041294117..beea876d550 100644
17 --- a/dev-python/vcstools/vcstools-0.1.42.ebuild
18 +++ b/dev-python/vcstools/vcstools-0.1.42.ebuild
19 @@ -2,58 +2,56 @@
20 # Distributed under the terms of the GNU General Public License v2
21
22 EAPI=7
23 -PYTHON_COMPAT=( python{3_7,3_8} )
24
25 -SCM=""
26 -if [ "${PV#9999}" != "${PV}" ] ; then
27 - SCM="git-r3"
28 - EGIT_REPO_URI="https://github.com/vcstools/vcstools"
29 -fi
30 +PYTHON_COMPAT=( python3_{8..10} )
31
32 -inherit ${SCM} distutils-r1
33 +inherit distutils-r1
34
35 DESCRIPTION="Python library for interacting with various VCS systems"
36 HOMEPAGE="https://wiki.ros.org/vcstools"
37 -if [ "${PV#9999}" != "${PV}" ] ; then
38 - SRC_URI=""
39 -else
40 - SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
41 - https://github.com/vcstools/vcstools/archive/${PV}.tar.gz -> ${P}.tar.gz
42 - "
43 - KEYWORDS="~amd64 ~arm"
44 -fi
45 +SRC_URI="
46 + http://download.ros.org/downloads/${PN}/${P}.tar.gz
47 + https://github.com/vcstools/vcstools/archive/${PV}.tar.gz -> ${P}.tar.gz
48 +"
49
50 LICENSE="BSD"
51 SLOT="0"
52 -IUSE="test"
53 -RESTRICT="!test? ( test )"
54 +KEYWORDS="~amd64 ~arm"
55
56 RDEPEND="
57 dev-python/pyyaml[${PYTHON_USEDEP}]
58 dev-python/python-dateutil[${PYTHON_USEDEP}]
59 "
60 -DEPEND="${RDEPEND}"
61 BDEPEND="test? (
62 - dev-python/nose[${PYTHON_USEDEP}]
63 + dev-python/mock[${PYTHON_USEDEP}]
64 dev-vcs/git
65 - dev-vcs/bzr
66 dev-vcs/mercurial
67 dev-vcs/subversion
68 )
69 "
70 +
71 PATCHES=( "${FILESDIR}/yaml.patch" )
72
73 -python_test() {
74 +distutils_enable_tests nose
75 +
76 +src_prepare() {
77 + # Those fail because of broken upstream testing
78 + rm test/test_bzr.py || die
79 + sed -e 's/test_checkout_timeout/_&/' -i test/test_git.py || die
80 +
81 + distutils-r1_src_prepare
82 +}
83 +
84 +src_test() {
85 # From travis.yml
86 # Set git config to silence some stuff in the tests
87 - git config --global user.email "foo@×××××××.com"
88 - git config --global user.name "Foo Bar"
89 + git config --global user.email "foo@×××××××.com" || die
90 + git config --global user.name "Foo Bar" || die
91 # Set the hg user
92 - echo -e "[ui]\nusername = Your Name <your@××××.com>" >> ~/.hgrc
93 - # Set the bzr user
94 - bzr whoami "Your Name <name@×××××××.com>"
95 - #git config --global user.email "you@×××××××.com"
96 - #git config --global user.name "Your Name"
97 + cat > ~/.hgrc <<- EOF || die
98 + [ui]
99 + username = Your Name <your@××××.com>
100 + EOF
101
102 - nosetests --with-coverage --cover-package vcstools || die
103 + distutils-r1_src_test
104 }