From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- dev-python/rosdistro/Manifest | 9 +- dev-python/rosdistro/files/yaml.patch | 252 ++++++++++++++++++++++++++++ dev-python/rosdistro/rosdistro-0.7.2.ebuild | 1 + dev-python/rosdistro/rosdistro-0.7.4.ebuild | 1 + dev-python/rosdistro/rosdistro-0.8.0.ebuild | 54 ++++++ dev-python/rosdistro/rosdistro-9999.ebuild | 10 +- 6 files changed, 323 insertions(+), 4 deletions(-) create mode 100644 dev-python/rosdistro/files/yaml.patch create mode 100644 dev-python/rosdistro/rosdistro-0.8.0.ebuild (limited to 'dev-python/rosdistro') diff --git a/dev-python/rosdistro/Manifest b/dev-python/rosdistro/Manifest index 7b4cf03bbf8c..d3ed52ff537d 100644 --- a/dev-python/rosdistro/Manifest +++ b/dev-python/rosdistro/Manifest @@ -1,6 +1,9 @@ +AUX yaml.patch 10168 BLAKE2B bd9bbcc2d5cb1fbc99ccc6f61e72057efa75882eb18d5bd676c4c2e3a46395d406d212e6526e89f31ed95412f370ef79cc8934671b0496114776ee325b340dbc SHA512 2777345d1008698092a76c8d6783b372627c0e872895c1d4b0536816fbf12fb8719d3f3c48251ede194646076c4cacfb50ded3d73b360ae2b1c7a7f0b09e5905 DIST rosdistro-0.7.2.tar.gz 60091 BLAKE2B 40f2a47fcf5a13d0b8b9eb29fcee9bfbd811a7541dac74e6be76e2c67ba34adf0b7c2df8804300e35262bbb36efa890128e06217c93ecfc834015010e344e42d SHA512 ca6c0d19c2218efe8bf27c1cc22c4c9b683dccb5f8029208e0b581cb358fbe32733895896b1afece45b6576f254f4535032cea962587aa47d93235767c6baf60 DIST rosdistro-0.7.4.tar.gz 60365 BLAKE2B a2b9af6b584abc057d0b5e7d1087438834801eea33555fb094bc938e1ec642a5d41057f61ee3d3f80ca3ea083e8cb6989f6907cfbc9973067a32d0ee505101d8 SHA512 9e2cbc88290b3a132fa5aeec446ca25a89365367a57a97f49cc26533139f91b2a50a1f2f6176f4333900bf7fa21d49c9836d65e74dc8322fe8c5811c49794291 -EBUILD rosdistro-0.7.2.ebuild 1034 BLAKE2B d91786449f5db17442a81ab8afcadc5f025b93158ac3b4e36dfa23c7d30b7adbdd3e384e8ca7c1c281de15083781101538ace0a5a8d123cb557d5df181ba9173 SHA512 48ff23cbb89af415569624b08ff1d6b7175126ae7c2f0dd1a892667646930900998d6d7415c10d83043d59298dcaeaef988cb80b33a35411ecd5f71cf267bffa -EBUILD rosdistro-0.7.4.ebuild 1034 BLAKE2B d91786449f5db17442a81ab8afcadc5f025b93158ac3b4e36dfa23c7d30b7adbdd3e384e8ca7c1c281de15083781101538ace0a5a8d123cb557d5df181ba9173 SHA512 48ff23cbb89af415569624b08ff1d6b7175126ae7c2f0dd1a892667646930900998d6d7415c10d83043d59298dcaeaef988cb80b33a35411ecd5f71cf267bffa -EBUILD rosdistro-9999.ebuild 1034 BLAKE2B d91786449f5db17442a81ab8afcadc5f025b93158ac3b4e36dfa23c7d30b7adbdd3e384e8ca7c1c281de15083781101538ace0a5a8d123cb557d5df181ba9173 SHA512 48ff23cbb89af415569624b08ff1d6b7175126ae7c2f0dd1a892667646930900998d6d7415c10d83043d59298dcaeaef988cb80b33a35411ecd5f71cf267bffa +DIST rosdistro-0.8.0.tar.gz 60527 BLAKE2B 9404452dc62c9f7d1482de3c13df0093ac26a60554c97fa097cb14548cdb814fbdc96a26db2d24aa1f2eb99de86f27807ecdc50e0e00a8fa727af8803ab5d644 SHA512 1f4620454f78bd03f75a8b1b8535588a8d6e50aeef17dbf346e8d0443a6fbc5ec83646767bf86521fb65508e205fc3edb8f0c97a81aec8d6b72088d9d78a14f0 +EBUILD rosdistro-0.7.2.ebuild 1061 BLAKE2B 5f771038734ec29a90ec5891723983112d54130570960d824c0959aa09de63ff7dd3e118747418db34d790d84b595bf576c4405e440fee08de0e009dd4261fb2 SHA512 27e73d49c98dc2a84cf3c095bdaec09be9ac071db562a1d837974da9b8daebdfcc06de51b1e125a659f2fcc18c5acea18daaf96fde601ea3963e19956b2244c5 +EBUILD rosdistro-0.7.4.ebuild 1061 BLAKE2B 5f771038734ec29a90ec5891723983112d54130570960d824c0959aa09de63ff7dd3e118747418db34d790d84b595bf576c4405e440fee08de0e009dd4261fb2 SHA512 27e73d49c98dc2a84cf3c095bdaec09be9ac071db562a1d837974da9b8daebdfcc06de51b1e125a659f2fcc18c5acea18daaf96fde601ea3963e19956b2244c5 +EBUILD rosdistro-0.8.0.ebuild 1196 BLAKE2B e2917a9bdc64d80bfc4675c023453a97c61814403aeac0976c98c570b9a60f08a304e4b357470964fa30ba2541a2e5a8ef0221a71a3a1e7e155f8619b1c832b8 SHA512 66c98cc53826e490cbe4d38dd8729b0cfd11480fb95d9c3f6297f40c3638dc01dcd810b1610621d23bf0ed70c80123994804873093647a94970dc6a98b373da7 +EBUILD rosdistro-9999.ebuild 1196 BLAKE2B e2917a9bdc64d80bfc4675c023453a97c61814403aeac0976c98c570b9a60f08a304e4b357470964fa30ba2541a2e5a8ef0221a71a3a1e7e155f8619b1c832b8 SHA512 66c98cc53826e490cbe4d38dd8729b0cfd11480fb95d9c3f6297f40c3638dc01dcd810b1610621d23bf0ed70c80123994804873093647a94970dc6a98b373da7 MISC metadata.xml 342 BLAKE2B 1975e171b6e686c5fa1cf51909101b1785f2610f619de6465329c935023adcbe5d0373512bf7e7fb5a2451e31664faeb2aed67eb9af58d40005f10ee1582e4f9 SHA512 5f55e6edbfd3be1214791b1897ce625f6cc52989ac007d7de9c9eb0bff57c1ca805ee18b911fcc2c29a86a5fb9f68e1b9647f69a38dc6b1d1d74334b35ac106d diff --git a/dev-python/rosdistro/files/yaml.patch b/dev-python/rosdistro/files/yaml.patch new file mode 100644 index 000000000000..2f81a0218b89 --- /dev/null +++ b/dev-python/rosdistro/files/yaml.patch @@ -0,0 +1,252 @@ +Index: rosdistro-0.8.0/scripts/rosdistro_convert +=================================================================== +--- rosdistro-0.8.0.orig/scripts/rosdistro_convert ++++ rosdistro-0.8.0/scripts/rosdistro_convert +@@ -58,7 +58,7 @@ def get_targets(): + url = BASE_SRC_URL + '/releases/targets.yaml' + print('Load "%s"' % url) + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + targets = {} + for d in data: + targets[d.keys()[0]] = d.values()[0] +@@ -69,13 +69,13 @@ def convert_release(dist_name, targets): + url = BASE_SRC_URL + '/releases/%s.yaml' % dist_name + print('Load "%s"' % url) + yaml_str = load_url(url) +- input_ = yaml.load(yaml_str) ++ input_ = yaml.safe_load(yaml_str) + + # improve conversion performance by reusing results from last run + last_dist = None + if os.path.exists(dist_name + '/release.yaml'): + with open(dist_name + '/release.yaml', 'r') as f: +- last_data = yaml.load(f.read()) ++ last_data = yaml.safe_load(f.read()) + last_dist = ReleaseFile(dist_name, last_data) + + output = {} +@@ -162,7 +162,7 @@ def convert_source(dist_name): + url = BASE_SRC_URL + '/releases/%s-devel.yaml' % dist_name + print('Load "%s"' % url) + yaml_str = load_url(url) +- input_ = yaml.load(yaml_str) ++ input_ = yaml.safe_load(yaml_str) + + output = {} + output['type'] = 'source' +@@ -207,7 +207,7 @@ def convert_doc(dist_name): + if filename.endswith('.rosinstall'): + name = os.path.splitext(os.path.basename(filename))[0] + with open(os.path.join(doc_base, filename)) as f: +- data = yaml.load(f) ++ data = yaml.safe_load(f) + if name.endswith('_depends'): + rosinstall_depends[name] = data + else: +Index: rosdistro-0.8.0/scripts/rosdistro_migrate_to_rep_141 +=================================================================== +--- rosdistro-0.8.0.orig/scripts/rosdistro_migrate_to_rep_141 ++++ rosdistro-0.8.0/scripts/rosdistro_migrate_to_rep_141 +@@ -18,7 +18,7 @@ import yaml + + + def migrate(index_yaml): +- data = yaml.load(open(index_yaml, 'r')) ++ data = yaml.safe_load(open(index_yaml, 'r')) + assert data['type'] == 'index' + assert data['version'] == 1 + data['version'] = 2 +@@ -75,7 +75,7 @@ def generate_repos_url(repos_url, doc_ur + data['repositories'] = {} + + # migrate release stuff +- release_data = yaml.load(open(release_url, 'r')) ++ release_data = yaml.safe_load(open(release_url, 'r')) + assert release_data['type'] == 'release' + assert release_data['version'] == 1 + +@@ -100,7 +100,7 @@ def generate_repos_url(repos_url, doc_ur + data['repositories'][repo_name] = repo_data + + # migrate doc stuff +- doc_data = yaml.load(open(doc_url, 'r')) ++ doc_data = yaml.safe_load(open(doc_url, 'r')) + assert doc_data['type'] == 'doc' + assert doc_data['version'] == 1 + +@@ -111,7 +111,7 @@ def generate_repos_url(repos_url, doc_ur + data['repositories'][repo_name]['doc'] = get_dict_parts(doc_repo_data, ['type', 'url', 'version']) + + # migrate source stuff +- source_data = yaml.load(open(source_url, 'r')) ++ source_data = yaml.safe_load(open(source_url, 'r')) + assert source_data['type'] == 'source' + assert source_data['version'] == 1 + +@@ -137,10 +137,10 @@ def update_cache(index_yaml, distro_name + if not isinstance(yaml_str, str): + yaml_str = yaml_str.decode('utf-8') + f.close() +- cache_data = yaml.load(yaml_str) ++ cache_data = yaml.safe_load(yaml_str) + + del cache_data['release_file'] +- distribution_data = yaml.load(open(os.path.join(base, distribution_file), 'r')) ++ distribution_data = yaml.safe_load(open(os.path.join(base, distribution_file), 'r')) + cache_data['distribution_file'] = distribution_data + + cache_data['release_package_xmls'] = cache_data['package_xmls'] +Index: rosdistro-0.8.0/scripts/rosdistro_migrate_to_rep_143 +=================================================================== +--- rosdistro-0.8.0.orig/scripts/rosdistro_migrate_to_rep_143 ++++ rosdistro-0.8.0/scripts/rosdistro_migrate_to_rep_143 +@@ -10,7 +10,7 @@ import yaml + + + def migrate(index_yaml): +- data = yaml.load(open(index_yaml, 'r')) ++ data = yaml.safe_load(open(index_yaml, 'r')) + assert data['type'] == 'index' + assert data['version'] == 2 + data['version'] = 3 +Index: rosdistro-0.8.0/src/rosdistro/develdistro.py +=================================================================== +--- rosdistro-0.8.0.orig/src/rosdistro/develdistro.py ++++ rosdistro-0.8.0/src/rosdistro/develdistro.py +@@ -8,7 +8,7 @@ import yaml + class DevelDistro: + def __init__(self, name): + url = urlopen('https://raw.github.com/ros/rosdistro/master/releases/{0}-devel.yaml'.format(name)) +- distro = yaml.load(url.read())['repositories'] ++ distro = yaml.safe_load(url.read())['repositories'] + self.repositories = {} + for name, data in distro.iteritems(): + repo = DevelDistroRepo(name, data) +Index: rosdistro-0.8.0/src/rosdistro/legacy.py +=================================================================== +--- rosdistro-0.8.0.orig/src/rosdistro/legacy.py ++++ rosdistro-0.8.0/src/rosdistro/legacy.py +@@ -122,7 +122,7 @@ def get_release_cache(index, dist_name): + f.close() + else: + raise NotImplementedError('The url of the cache must end with either ".yaml" or ".yaml.gz"') +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + return ReleaseCache(dist_name, data) + + +Index: rosdistro-0.8.0/src/rosdistro/rosdistro.py +=================================================================== +--- rosdistro-0.8.0.orig/src/rosdistro/rosdistro.py ++++ rosdistro-0.8.0/src/rosdistro/rosdistro.py +@@ -161,7 +161,7 @@ class RosDistroFile: + + # parse ros distro file + distro_url = urlopen('https://raw.github.com/ros/rosdistro/master/releases/%s.yaml' % name) +- distro = yaml.load(distro_url.read())['repositories'] ++ distro = yaml.safe_load(distro_url.read())['repositories'] + + # loop over all repo's + for repo_name, data in distro.iteritems(): +@@ -338,7 +338,7 @@ class RosDependencies: + + tar = tarfile.open(fh.name, 'r') + data = tar.extractfile(self.file_name) +- deps = yaml.load(data.read()) ++ deps = yaml.safe_load(data.read()) + if not deps \ + or 'cache_version' not in deps \ + or deps['cache_version'] != CACHE_VERSION \ +Index: rosdistro-0.8.0/test/test_distribution.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_distribution.py ++++ rosdistro-0.8.0/test/test_distribution.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_distribution_file(): + url = 'file://' + FILES_DIR + '/foo/distribution.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + dist_file = DistributionFile('foo', data) + _validate_dist_file(dist_file) + +Index: rosdistro-0.8.0/test/test_doc.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_doc.py ++++ rosdistro-0.8.0/test/test_doc.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_doc_file(): + url = 'file://' + FILES_DIR + '/foo/distribution.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + doc_file = DocFile('foo', data) + _validate_doc_file(doc_file) + +Index: rosdistro-0.8.0/test/test_doc_build.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_doc_build.py ++++ rosdistro-0.8.0/test/test_doc_build.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_doc_build_file(): + url = 'file://' + FILES_DIR + '/foo/doc-build.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + DocBuildFile('foo', data) + + +Index: rosdistro-0.8.0/test/test_release.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_release.py ++++ rosdistro-0.8.0/test/test_release.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_release_file(): + url = 'file://' + FILES_DIR + '/foo/distribution.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + rel_file = ReleaseFile('foo', data) + _validate_rel_file(rel_file) + +Index: rosdistro-0.8.0/test/test_release_build.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_release_build.py ++++ rosdistro-0.8.0/test/test_release_build.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_release_build_file(): + url = 'file://' + FILES_DIR + '/foo/release-build.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + ReleaseBuildFile('foo', data) + + +Index: rosdistro-0.8.0/test/test_source.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_source.py ++++ rosdistro-0.8.0/test/test_source.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_source_file(): + url = 'file://' + FILES_DIR + '/foo/distribution.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + src_file = SourceFile('foo', data) + _validate_src_file(src_file) + +Index: rosdistro-0.8.0/test/test_source_build.py +=================================================================== +--- rosdistro-0.8.0.orig/test/test_source_build.py ++++ rosdistro-0.8.0/test/test_source_build.py +@@ -12,7 +12,7 @@ FILES_DIR = os.path.normpath(os.path.joi + def test_source_build_file(): + url = 'file://' + FILES_DIR + '/foo/source-build.yaml' + yaml_str = load_url(url) +- data = yaml.load(yaml_str) ++ data = yaml.safe_load(yaml_str) + SourceBuildFile('foo', data) + + diff --git a/dev-python/rosdistro/rosdistro-0.7.2.ebuild b/dev-python/rosdistro/rosdistro-0.7.2.ebuild index e7e27bc9f9fc..ef8fe8bcb38d 100644 --- a/dev-python/rosdistro/rosdistro-0.7.2.ebuild +++ b/dev-python/rosdistro/rosdistro-0.7.2.ebuild @@ -25,6 +25,7 @@ fi LICENSE="BSD" SLOT="0" IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" dev-python/catkin_pkg[${PYTHON_USEDEP}] diff --git a/dev-python/rosdistro/rosdistro-0.7.4.ebuild b/dev-python/rosdistro/rosdistro-0.7.4.ebuild index e7e27bc9f9fc..ef8fe8bcb38d 100644 --- a/dev-python/rosdistro/rosdistro-0.7.4.ebuild +++ b/dev-python/rosdistro/rosdistro-0.7.4.ebuild @@ -25,6 +25,7 @@ fi LICENSE="BSD" SLOT="0" IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" dev-python/catkin_pkg[${PYTHON_USEDEP}] diff --git a/dev-python/rosdistro/rosdistro-0.8.0.ebuild b/dev-python/rosdistro/rosdistro-0.8.0.ebuild new file mode 100644 index 000000000000..cf60a935e58c --- /dev/null +++ b/dev-python/rosdistro/rosdistro-0.8.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy{,3} ) + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/ros-infrastructure/rosdistro" +fi + +inherit ${SCM} distutils-r1 + +DESCRIPTION="Tools to work with catkinized rosdistro files" +HOMEPAGE="http://wiki.ros.org/rosdistro" +if [ "${PV#9999}" != "${PV}" ] ; then + SRC_URI="" + KEYWORDS="" +else + SRC_URI="https://github.com/ros-infrastructure/rosdistro/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/catkin_pkg[${PYTHON_USEDEP}] + dev-python/rospkg[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" +DEPEND="${RDEPEND} + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" +PATCHES=( "${FILESDIR}/yaml.patch" ) + +src_prepare() { + # Requires network access + rm -f test/test_manifest_providers.py + default +} + +python_test() { + nosetests --with-xunit test || die +} diff --git a/dev-python/rosdistro/rosdistro-9999.ebuild b/dev-python/rosdistro/rosdistro-9999.ebuild index e7e27bc9f9fc..cf60a935e58c 100644 --- a/dev-python/rosdistro/rosdistro-9999.ebuild +++ b/dev-python/rosdistro/rosdistro-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python{2_7,3_5,3_6} pypy{,3} ) +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy{,3} ) SCM="" if [ "${PV#9999}" != "${PV}" ] ; then @@ -25,6 +25,7 @@ fi LICENSE="BSD" SLOT="0" IUSE="test" +RESTRICT="!test? ( test )" RDEPEND=" dev-python/catkin_pkg[${PYTHON_USEDEP}] @@ -40,6 +41,13 @@ DEPEND="${RDEPEND} dev-python/mock[${PYTHON_USEDEP}] ) " +PATCHES=( "${FILESDIR}/yaml.patch" ) + +src_prepare() { + # Requires network access + rm -f test/test_manifest_providers.py + default +} python_test() { nosetests --with-xunit test || die -- cgit v1.2.3