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-util/rosinstall/
Date: Sat, 29 Jan 2022 06:30:43
Message-Id: 1643437828.f6db8cf2d7b1993ed43317b5444822ee88b26cd3.arthurzam@gentoo
1 commit: f6db8cf2d7b1993ed43317b5444822ee88b26cd3
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 06:28:53 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 06:30:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6db8cf2
7
8 dev-util/rosinstall: enable py3.9, py3.10, cleanup
9
10 Closes: https://bugs.gentoo.org/832246
11 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
12
13 dev-util/rosinstall/rosinstall-0.7.8.ebuild | 41 +++++++++++++----------------
14 dev-util/rosinstall/rosinstall-9999.ebuild | 41 +++++++++++++----------------
15 2 files changed, 38 insertions(+), 44 deletions(-)
16
17 diff --git a/dev-util/rosinstall/rosinstall-0.7.8.ebuild b/dev-util/rosinstall/rosinstall-0.7.8.ebuild
18 index e77de122d88a..9ad54ef86e60 100644
19 --- a/dev-util/rosinstall/rosinstall-0.7.8.ebuild
20 +++ b/dev-util/rosinstall/rosinstall-0.7.8.ebuild
21 @@ -1,21 +1,18 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 +# Copyright 1999-2022 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 EAPI=7
27 -PYTHON_COMPAT=( python3_{7,8} )
28
29 -SCM=""
30 -if [ "${PV#9999}" != "${PV}" ] ; then
31 - SCM="git-r3"
32 - EGIT_REPO_URI="https://github.com/vcstools/rosinstall"
33 -fi
34 -
35 -inherit ${SCM} distutils-r1
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +DISTUTILS_IN_SOURCE_BUILD="yes"
38 +inherit distutils-r1
39
40 DESCRIPTION="Command-line tools for maintaining a workspace of projects for ROS"
41 HOMEPAGE="https://wiki.ros.org/rosinstall https://wiki.ros.org/roslocate"
42 -if [ "${PV#9999}" != "${PV}" ] ; then
43 - SRC_URI=""
44 +
45 +if [[ ${PV} == 9999* ]] ; then
46 + inherit git-r3
47 + EGIT_REPO_URI="https://github.com/vcstools/rosinstall"
48 else
49 SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
50 https://github.com/vcstools/rosinstall/archive/${PV}.tar.gz -> ${P}.tar.gz
51 @@ -25,8 +22,6 @@ fi
52
53 LICENSE="BSD"
54 SLOT="0"
55 -IUSE="test"
56 -RESTRICT="!test? ( test )"
57
58 RDEPEND="
59 dev-python/catkin_pkg[${PYTHON_USEDEP}]
60 @@ -34,9 +29,8 @@ RDEPEND="
61 dev-python/rosdistro[${PYTHON_USEDEP}]
62 >=dev-util/wstool-0.1.12[${PYTHON_USEDEP}]
63 dev-python/pyyaml[${PYTHON_USEDEP}]"
64 -DEPEND="${RDEPEND}
65 +BDEPEND="${RDEPEND}
66 test? (
67 - dev-python/nose[${PYTHON_USEDEP}]
68 dev-vcs/git
69 dev-vcs/bzr
70 dev-vcs/mercurial
71 @@ -44,17 +38,20 @@ DEPEND="${RDEPEND}
72 )
73 "
74
75 -python_test() {
76 +distutils_enable_tests nose
77 +
78 +src_test() {
79 # From travis.yml
80 # Set git config to silence some stuff in the tests
81 - git config --global user.email "foo@×××××××.com"
82 - git config --global user.name "Foo Bar"
83 + git config --global user.email "foo@×××××××.com" || die
84 + git config --global user.name "Foo Bar" || die
85 # Set the hg user
86 - echo -e "[ui]\nusername = Your Name <your@××××.com>" >> ~/.hgrc
87 + echo -e "[ui]\nusername = Your Name <your@××××.com>" >> ~/.hgrc || die
88 # Set the bzr user
89 - bzr whoami "Your Name <name@×××××××.com>"
90 + bzr whoami "Your Name <name@×××××××.com>" || die
91 # command to run tests
92 # Local tests work even if ros.org is down
93 - export ROSINSTALL_SKIP_PYTHON3=1
94 - nosetests test || die
95 + local -x ROSINSTALL_SKIP_PYTHON3=1
96 +
97 + distutils-r1_src_test
98 }
99
100 diff --git a/dev-util/rosinstall/rosinstall-9999.ebuild b/dev-util/rosinstall/rosinstall-9999.ebuild
101 index e77de122d88a..9ad54ef86e60 100644
102 --- a/dev-util/rosinstall/rosinstall-9999.ebuild
103 +++ b/dev-util/rosinstall/rosinstall-9999.ebuild
104 @@ -1,21 +1,18 @@
105 -# Copyright 1999-2021 Gentoo Authors
106 +# Copyright 1999-2022 Gentoo Authors
107 # Distributed under the terms of the GNU General Public License v2
108
109 EAPI=7
110 -PYTHON_COMPAT=( python3_{7,8} )
111
112 -SCM=""
113 -if [ "${PV#9999}" != "${PV}" ] ; then
114 - SCM="git-r3"
115 - EGIT_REPO_URI="https://github.com/vcstools/rosinstall"
116 -fi
117 -
118 -inherit ${SCM} distutils-r1
119 +PYTHON_COMPAT=( python3_{8..10} )
120 +DISTUTILS_IN_SOURCE_BUILD="yes"
121 +inherit distutils-r1
122
123 DESCRIPTION="Command-line tools for maintaining a workspace of projects for ROS"
124 HOMEPAGE="https://wiki.ros.org/rosinstall https://wiki.ros.org/roslocate"
125 -if [ "${PV#9999}" != "${PV}" ] ; then
126 - SRC_URI=""
127 +
128 +if [[ ${PV} == 9999* ]] ; then
129 + inherit git-r3
130 + EGIT_REPO_URI="https://github.com/vcstools/rosinstall"
131 else
132 SRC_URI="http://download.ros.org/downloads/${PN}/${P}.tar.gz
133 https://github.com/vcstools/rosinstall/archive/${PV}.tar.gz -> ${P}.tar.gz
134 @@ -25,8 +22,6 @@ fi
135
136 LICENSE="BSD"
137 SLOT="0"
138 -IUSE="test"
139 -RESTRICT="!test? ( test )"
140
141 RDEPEND="
142 dev-python/catkin_pkg[${PYTHON_USEDEP}]
143 @@ -34,9 +29,8 @@ RDEPEND="
144 dev-python/rosdistro[${PYTHON_USEDEP}]
145 >=dev-util/wstool-0.1.12[${PYTHON_USEDEP}]
146 dev-python/pyyaml[${PYTHON_USEDEP}]"
147 -DEPEND="${RDEPEND}
148 +BDEPEND="${RDEPEND}
149 test? (
150 - dev-python/nose[${PYTHON_USEDEP}]
151 dev-vcs/git
152 dev-vcs/bzr
153 dev-vcs/mercurial
154 @@ -44,17 +38,20 @@ DEPEND="${RDEPEND}
155 )
156 "
157
158 -python_test() {
159 +distutils_enable_tests nose
160 +
161 +src_test() {
162 # From travis.yml
163 # Set git config to silence some stuff in the tests
164 - git config --global user.email "foo@×××××××.com"
165 - git config --global user.name "Foo Bar"
166 + git config --global user.email "foo@×××××××.com" || die
167 + git config --global user.name "Foo Bar" || die
168 # Set the hg user
169 - echo -e "[ui]\nusername = Your Name <your@××××.com>" >> ~/.hgrc
170 + echo -e "[ui]\nusername = Your Name <your@××××.com>" >> ~/.hgrc || die
171 # Set the bzr user
172 - bzr whoami "Your Name <name@×××××××.com>"
173 + bzr whoami "Your Name <name@×××××××.com>" || die
174 # command to run tests
175 # Local tests work even if ros.org is down
176 - export ROSINSTALL_SKIP_PYTHON3=1
177 - nosetests test || die
178 + local -x ROSINSTALL_SKIP_PYTHON3=1
179 +
180 + distutils-r1_src_test
181 }