dev-python/ruamel-yaml: add new package
authorAndrey Utkin <andrey_utkin@gentoo.org>
Wed, 7 Feb 2018 12:09:32 +0000 (12:09 +0000)
committerAndrey Utkin <andrey_utkin@gentoo.org>
Wed, 7 Feb 2018 12:12:20 +0000 (12:12 +0000)
A new dependency of app-misc/khard.

Based on work by Foster McLane <fkmclane@gmail.com>

Bug: https://bugs.gentoo.org/644994
Package-Manager: Portage-2.3.19, Repoman-2.3.6

dev-python/ruamel-yaml/Manifest [new file with mode: 0644]
dev-python/ruamel-yaml/metadata.xml [new file with mode: 0644]
dev-python/ruamel-yaml/ruamel-yaml-0.15.35.ebuild [new file with mode: 0644]

diff --git a/dev-python/ruamel-yaml/Manifest b/dev-python/ruamel-yaml/Manifest
new file mode 100644 (file)
index 0000000..7c1d51a
--- /dev/null
@@ -0,0 +1 @@
+DIST ruamel-yaml-0.15.35.tar.gz 344241 BLAKE2B 3e77f5da4e2a7f64099da1d79a108adfb093c5e47baaf11611462637ec6e29091924088e0ce261b21283a0ab07123da45a1ea7b0c522692d1e96cdcc27502541 SHA512 9e335d627db20b85ec0384f16d7ea03c310c01e84517e7b9bced1af9289fe542b87eb31da8ad960b17d26f35f2cc33a87a5a5b976e0e5ca587339b21b4b53fca
diff --git a/dev-python/ruamel-yaml/metadata.xml b/dev-python/ruamel-yaml/metadata.xml
new file mode 100644 (file)
index 0000000..8c9ad62
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>fkmclane@gmail.com</email>
+               <name>Foster McLane</name>
+       </maintainer>
+       <maintainer type="person">
+               <email>andrey_utkin@gentoo.org</email>
+               <name>Andrey Utkin</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="bitbucket">ruamel/yaml</remote-id>
+               <remote-id type="pypi">ruamel.yaml</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-python/ruamel-yaml/ruamel-yaml-0.15.35.ebuild b/dev-python/ruamel-yaml/ruamel-yaml-0.15.35.ebuild
new file mode 100644 (file)
index 0000000..47cb541
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="YAML parser/emitter that supports roundtrip comment preservation"
+HOMEPAGE="https://pypi.python.org/pypi/ruamel.yaml https://bitbucket.org/ruamel/yaml"
+MY_PN="${PN//-/.}"
+SRC_URI="https://bitbucket.org/${MY_PN/.//}/get/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+"
+DEPEND="
+       ${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               dev-python/flake8[${PYTHON_USEDEP}]
+               dev-python/pytest[${PYTHON_USEDEP}]
+               dev-python/ruamel-std-pathlib[${PYTHON_USEDEP}]
+       )
+"
+
+python_install() {
+       distutils-r1_python_install --single-version-externally-managed
+       find "${ED}" -name '*.pth' -delete || die
+}
+
+python_test() {
+       # This file produced by setup.py breaks finding system-wide installed
+       # ruamel.std.pathlib due to shared namespace
+       rm "${BUILD_DIR}/lib/ruamel/__init__.py" || die
+
+       py.test -v _test/test_*.py || die
+}