commit:     f6db8cf2d7b1993ed43317b5444822ee88b26cd3
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 29 06:28:53 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 06:30:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6db8cf2

dev-util/rosinstall: enable py3.9, py3.10, cleanup

Closes: https://bugs.gentoo.org/832246
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-util/rosinstall/rosinstall-0.7.8.ebuild | 41 +++++++++++++----------------
 dev-util/rosinstall/rosinstall-9999.ebuild  | 41 +++++++++++++----------------
 2 files changed, 38 insertions(+), 44 deletions(-)

diff --git a/dev-util/rosinstall/rosinstall-0.7.8.ebuild 
b/dev-util/rosinstall/rosinstall-0.7.8.ebuild
index e77de122d88a..9ad54ef86e60 100644
--- a/dev-util/rosinstall/rosinstall-0.7.8.ebuild
+++ b/dev-util/rosinstall/rosinstall-0.7.8.ebuild
@@ -1,21 +1,18 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
 
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SCM="git-r3"
-       EGIT_REPO_URI="https://github.com/vcstools/rosinstall";
-fi
-
-inherit ${SCM} distutils-r1
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_IN_SOURCE_BUILD="yes"
+inherit distutils-r1
 
 DESCRIPTION="Command-line tools for maintaining a workspace of projects for 
ROS"
 HOMEPAGE="https://wiki.ros.org/rosinstall https://wiki.ros.org/roslocate";
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SRC_URI=""
+
+if [[ ${PV} == 9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/vcstools/rosinstall";
 else
        SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
                https://github.com/vcstools/rosinstall/archive/${PV}.tar.gz -> 
${P}.tar.gz
@@ -25,8 +22,6 @@ fi
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
 RDEPEND="
        dev-python/catkin_pkg[${PYTHON_USEDEP}]
@@ -34,9 +29,8 @@ RDEPEND="
        dev-python/rosdistro[${PYTHON_USEDEP}]
        >=dev-util/wstool-0.1.12[${PYTHON_USEDEP}]
        dev-python/pyyaml[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
+BDEPEND="${RDEPEND}
        test? (
-               dev-python/nose[${PYTHON_USEDEP}]
                dev-vcs/git
                dev-vcs/bzr
                dev-vcs/mercurial
@@ -44,17 +38,20 @@ DEPEND="${RDEPEND}
        )
 "
 
-python_test() {
+distutils_enable_tests nose
+
+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
+       echo -e "[ui]\nusername = Your Name <[email protected]>" >> ~/.hgrc || die
        # Set the bzr user
-       bzr whoami "Your Name <[email protected]>"
+       bzr whoami "Your Name <[email protected]>" || die
        # command to run tests
        # Local tests work even if ros.org is down
-       export ROSINSTALL_SKIP_PYTHON3=1
-       nosetests test || die
+       local -x ROSINSTALL_SKIP_PYTHON3=1
+
+       distutils-r1_src_test
 }

diff --git a/dev-util/rosinstall/rosinstall-9999.ebuild 
b/dev-util/rosinstall/rosinstall-9999.ebuild
index e77de122d88a..9ad54ef86e60 100644
--- a/dev-util/rosinstall/rosinstall-9999.ebuild
+++ b/dev-util/rosinstall/rosinstall-9999.ebuild
@@ -1,21 +1,18 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
 
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SCM="git-r3"
-       EGIT_REPO_URI="https://github.com/vcstools/rosinstall";
-fi
-
-inherit ${SCM} distutils-r1
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_IN_SOURCE_BUILD="yes"
+inherit distutils-r1
 
 DESCRIPTION="Command-line tools for maintaining a workspace of projects for 
ROS"
 HOMEPAGE="https://wiki.ros.org/rosinstall https://wiki.ros.org/roslocate";
-if [ "${PV#9999}" != "${PV}" ] ; then
-       SRC_URI=""
+
+if [[ ${PV} == 9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/vcstools/rosinstall";
 else
        SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
                https://github.com/vcstools/rosinstall/archive/${PV}.tar.gz -> 
${P}.tar.gz
@@ -25,8 +22,6 @@ fi
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
 
 RDEPEND="
        dev-python/catkin_pkg[${PYTHON_USEDEP}]
@@ -34,9 +29,8 @@ RDEPEND="
        dev-python/rosdistro[${PYTHON_USEDEP}]
        >=dev-util/wstool-0.1.12[${PYTHON_USEDEP}]
        dev-python/pyyaml[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
+BDEPEND="${RDEPEND}
        test? (
-               dev-python/nose[${PYTHON_USEDEP}]
                dev-vcs/git
                dev-vcs/bzr
                dev-vcs/mercurial
@@ -44,17 +38,20 @@ DEPEND="${RDEPEND}
        )
 "
 
-python_test() {
+distutils_enable_tests nose
+
+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
+       echo -e "[ui]\nusername = Your Name <[email protected]>" >> ~/.hgrc || die
        # Set the bzr user
-       bzr whoami "Your Name <[email protected]>"
+       bzr whoami "Your Name <[email protected]>" || die
        # command to run tests
        # Local tests work even if ros.org is down
-       export ROSINSTALL_SKIP_PYTHON3=1
-       nosetests test || die
+       local -x ROSINSTALL_SKIP_PYTHON3=1
+
+       distutils-r1_src_test
 }

Reply via email to