summaryrefslogtreecommitdiff
path: root/dev-python/rospkg
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/rospkg
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/rospkg')
-rw-r--r--dev-python/rospkg/Manifest2
-rw-r--r--dev-python/rospkg/files/gentoo.patch15
-rw-r--r--dev-python/rospkg/files/yaml_load.patch52
-rw-r--r--dev-python/rospkg/metadata.xml12
-rw-r--r--dev-python/rospkg/rospkg-1.2.0.ebuild50
-rw-r--r--dev-python/rospkg/rospkg-1.2.6.ebuild50
-rw-r--r--dev-python/rospkg/rospkg-9999.ebuild50
7 files changed, 231 insertions, 0 deletions
diff --git a/dev-python/rospkg/Manifest b/dev-python/rospkg/Manifest
new file mode 100644
index 000000000000..2ad08e490359
--- /dev/null
+++ b/dev-python/rospkg/Manifest
@@ -0,0 +1,2 @@
+DIST rospkg-1.2.0.tar.gz 90516 BLAKE2B 0c1d993c70f0ad383ab457c846416a22b9adf9611704a918c3765659231846749228073ea04950ddfdbe13f7e51f87ce5d17c1488f995e846a6590a0f9549efd SHA512 f059259a38b8b2281496a69f8a55fdd31a11e91583babb82e574363c40c90221a4abb7c1d7a5ed6be3b2389ee6aaf08b4e016260c73dd779f8c7993e6eba78db
+DIST rospkg-1.2.6.tar.gz 90944 BLAKE2B 26bd4a9deb3c6876b870ec6ccb11dfdb7820d0cf23fef2fcea8391543c58cf8e916253316df443cc9cc7e364ab790a8915e77986aef3f400785f50604fbd2a45 SHA512 6c88c8789927d72f8f882930aeef776dbec3c4d1343a2d4143d920684c8d2007021397a42008521c87dfc637302b9266615e13623ef5dc5c076e6e8cfd9e957d
diff --git a/dev-python/rospkg/files/gentoo.patch b/dev-python/rospkg/files/gentoo.patch
new file mode 100644
index 000000000000..5a9e7738b390
--- /dev/null
+++ b/dev-python/rospkg/files/gentoo.patch
@@ -0,0 +1,15 @@
+Strip ros_packages/ from paths. ros_packages is only for avoiding to crawl the
+whole /usr but the real one in the path without it.
+
+Index: rospkg-1.1.0/src/rospkg/rospack.py
+===================================================================
+--- rospkg-1.1.0.orig/src/rospkg/rospack.py
++++ rospkg-1.1.0/src/rospkg/rospack.py
+@@ -59,6 +59,7 @@ def list_by_path(manifest_name, path, ca
+ path = os.path.abspath(path)
+ basename = os.path.basename
+ for d, dirs, files in os.walk(path, topdown=True, followlinks=True):
++ d = d.replace('ros_packages/', '')
+ if 'CATKIN_IGNORE' in files:
+ del dirs[:]
+ continue # leaf
diff --git a/dev-python/rospkg/files/yaml_load.patch b/dev-python/rospkg/files/yaml_load.patch
new file mode 100644
index 000000000000..f56b6db59ad8
--- /dev/null
+++ b/dev-python/rospkg/files/yaml_load.patch
@@ -0,0 +1,52 @@
+Index: rospkg-1.2.0/src/rospkg/distro.py
+===================================================================
+--- rospkg-1.2.0.orig/src/rospkg/distro.py
++++ rospkg-1.2.0/src/rospkg/distro.py
+@@ -192,14 +192,14 @@ def load_distro(source_uri):
+ if os.path.isfile(source_uri):
+ # load rosdistro file
+ with open(source_uri) as f:
+- raw_data = yaml.load(f.read())
++ raw_data = yaml.safe_load(f.read())
+ else:
+ try:
+ request = urlopen(source_uri)
+ except Exception as e:
+ raise ResourceNotFound('%s (%s)' % (str(e), source_uri))
+ try:
+- raw_data = yaml.load(request)
++ raw_data = yaml.safe_load(request)
+ except ValueError:
+ raise ResourceNotFound(source_uri)
+ if not type(raw_data) == dict:
+Index: rospkg-1.2.0/test/test_rospkg_distro.py
+===================================================================
+--- rospkg-1.2.0.orig/test/test_rospkg_distro.py
++++ rospkg-1.2.0/test/test_rospkg_distro.py
+@@ -315,7 +315,7 @@ def test_load_distro_simple():
+
+ assert distro.release_name == 'simple', distro.release_name
+ assert distro.version == '1', distro.version
+- assert yaml.load(open(p)) == distro.raw_data, distro.raw_data
++ assert yaml.safe_load(open(p)) == distro.raw_data, distro.raw_data
+ assert set(distro.variants.keys()) == set(['base'])
+ assert set(distro.stacks.keys()) == set(['stack1'])
+
+@@ -334,7 +334,7 @@ def test_load_distro_diamondback():
+
+ assert distro.release_name == 'diamondback', distro.release_name
+ assert distro.version == 'r8596', distro.version
+- assert yaml.load(open(p)) == distro.raw_data, distro.raw_data
++ assert yaml.safe_load(open(p)) == distro.raw_data, distro.raw_data
+ assert set(distro.variants.keys()) == set(diamondback_variants)
+ assert set(distro.stacks.keys()) == set(diamondback_stacks), set(distro.stacks.keys()) ^ set(diamondback_stacks)
+
+@@ -350,7 +350,7 @@ def test_load_distro_diamondback():
+
+ def test__load_variants():
+ from rospkg.distro import _load_variants
+- raw_data = yaml.load("""variants:
++ raw_data = yaml.safe_load("""variants:
+ - ros-base:
+ stacks: [ros, ros_comm]
+ - ros-full:
diff --git a/dev-python/rospkg/metadata.xml b/dev-python/rospkg/metadata.xml
new file mode 100644
index 000000000000..b1ae9344667c
--- /dev/null
+++ b/dev-python/rospkg/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ros@gentoo.org</email>
+ <name>Gentoo ROS Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ros-infrastructure/rospkg</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/rospkg/rospkg-1.2.0.ebuild b/dev-python/rospkg/rospkg-1.2.0.ebuild
new file mode 100644
index 000000000000..d3245f8cb2a1
--- /dev/null
+++ b/dev-python/rospkg/rospkg-1.2.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_6,3_7} pypy3 )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://github.com/ros-infrastructure/rospkg"
+fi
+
+inherit ${SCM} distutils-r1
+
+DESCRIPTION="Standalone Python library for the ROS package system"
+HOMEPAGE="http://wiki.ros.org/rospkg"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+ KEYWORDS=""
+ # Needed for tests
+ S="${WORKDIR}/${PN}"
+ EGIT_CHECKOUT_DIR="${S}"
+else
+ SRC_URI="https://github.com/ros-infrastructure/rospkg/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/catkin_pkg[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND} ${BDEPEND}
+ test? (
+ dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+PATCHES=( "${FILESDIR}/gentoo.patch" "${FILESDIR}/yaml_load.patch" )
+
+python_test() {
+ nosetests --with-coverage --cover-package=rospkg --with-xunit test || die
+}
diff --git a/dev-python/rospkg/rospkg-1.2.6.ebuild b/dev-python/rospkg/rospkg-1.2.6.ebuild
new file mode 100644
index 000000000000..3dd32f0afe6f
--- /dev/null
+++ b/dev-python/rospkg/rospkg-1.2.6.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://github.com/ros-infrastructure/rospkg"
+fi
+
+inherit ${SCM} distutils-r1
+
+DESCRIPTION="Standalone Python library for the ROS package system"
+HOMEPAGE="http://wiki.ros.org/rospkg"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+ KEYWORDS=""
+ # Needed for tests
+ S="${WORKDIR}/${PN}"
+ EGIT_CHECKOUT_DIR="${S}"
+else
+ SRC_URI="https://github.com/ros-infrastructure/rospkg/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/catkin_pkg[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND} ${BDEPEND}
+ test? (
+ dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+PATCHES=( "${FILESDIR}/gentoo.patch" "${FILESDIR}/yaml_load.patch" )
+
+python_test() {
+ nosetests --with-coverage --cover-package=rospkg --with-xunit test || die
+}
diff --git a/dev-python/rospkg/rospkg-9999.ebuild b/dev-python/rospkg/rospkg-9999.ebuild
new file mode 100644
index 000000000000..3dd32f0afe6f
--- /dev/null
+++ b/dev-python/rospkg/rospkg-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+SCM=""
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://github.com/ros-infrastructure/rospkg"
+fi
+
+inherit ${SCM} distutils-r1
+
+DESCRIPTION="Standalone Python library for the ROS package system"
+HOMEPAGE="http://wiki.ros.org/rospkg"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ SRC_URI=""
+ KEYWORDS=""
+ # Needed for tests
+ S="${WORKDIR}/${PN}"
+ EGIT_CHECKOUT_DIR="${S}"
+else
+ SRC_URI="https://github.com/ros-infrastructure/rospkg/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/catkin_pkg[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND} ${BDEPEND}
+ test? (
+ dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+PATCHES=( "${FILESDIR}/gentoo.patch" "${FILESDIR}/yaml_load.patch" )
+
+python_test() {
+ nosetests --with-coverage --cover-package=rospkg --with-xunit test || die
+}