commit:     6851dd2506a943e2a3a7ebae29b441655f657f92
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 26 17:39:30 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 26 17:45:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6851dd25

dev-python/vcstools: enable py3.9, enable py3.10

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/vcstools/vcstools-0.1.42.ebuild | 56 ++++++++++++++----------------
 1 file changed, 27 insertions(+), 29 deletions(-)

diff --git a/dev-python/vcstools/vcstools-0.1.42.ebuild 
b/dev-python/vcstools/vcstools-0.1.42.ebuild
index 08041294117..beea876d550 100644
--- a/dev-python/vcstools/vcstools-0.1.42.ebuild
+++ b/dev-python/vcstools/vcstools-0.1.42.ebuild
@@ -2,58 +2,56 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python{3_7,3_8} )
 
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SCM="git-r3"
-       EGIT_REPO_URI="https://github.com/vcstools/vcstools";
-fi
+PYTHON_COMPAT=( python3_{8..10} )
 
-inherit ${SCM} distutils-r1
+inherit distutils-r1
 
 DESCRIPTION="Python library for interacting with various VCS systems"
 HOMEPAGE="https://wiki.ros.org/vcstools";
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SRC_URI=""
-else
-       SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
-               https://github.com/vcstools/vcstools/archive/${PV}.tar.gz -> 
${P}.tar.gz
-       "
-       KEYWORDS="~amd64 ~arm"
-fi
+SRC_URI="
+       http://download.ros.org/downloads/${PN}/${P}.tar.gz
+       https://github.com/vcstools/vcstools/archive/${PV}.tar.gz -> ${P}.tar.gz
+"
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
+KEYWORDS="~amd64 ~arm"
 
 RDEPEND="
        dev-python/pyyaml[${PYTHON_USEDEP}]
        dev-python/python-dateutil[${PYTHON_USEDEP}]
 "
-DEPEND="${RDEPEND}"
 BDEPEND="test? (
-               dev-python/nose[${PYTHON_USEDEP}]
+               dev-python/mock[${PYTHON_USEDEP}]
                dev-vcs/git
-               dev-vcs/bzr
                dev-vcs/mercurial
                dev-vcs/subversion
        )
 "
+
 PATCHES=( "${FILESDIR}/yaml.patch" )
 
-python_test() {
+distutils_enable_tests nose
+
+src_prepare() {
+       # Those fail because of broken upstream testing
+       rm test/test_bzr.py || die
+       sed -e 's/test_checkout_timeout/_&/' -i test/test_git.py || die
+
+       distutils-r1_src_prepare
+}
+
+src_test() {
        # From travis.yml
        # Set git config to silence some stuff in the tests
-       git config --global user.email "[email protected]"
-       git config --global user.name "Foo Bar"
+       git config --global user.email "[email protected]" || die
+       git config --global user.name "Foo Bar" || die
        # Set the hg user
-       echo -e "[ui]\nusername = Your Name <[email protected]>" >> ~/.hgrc
-       # Set the bzr user
-       bzr whoami "Your Name <[email protected]>"
-       #git config --global user.email "[email protected]"
-       #git config --global user.name "Your Name"
+       cat > ~/.hgrc <<- EOF || die
+               [ui]
+               username = Your Name <[email protected]>
+       EOF
 
-       nosetests --with-coverage --cover-package vcstools || die
+       distutils-r1_src_test
 }

Reply via email to