dev-python/yapf: new package.
authorHorea Christian <horea.christ@yandex.com>
Mon, 29 Oct 2018 17:32:53 +0000 (18:32 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Thu, 8 Nov 2018 22:25:45 +0000 (23:25 +0100)
A package which checks for good Python code style.

Signed-off-by: Horea Christian <horea.christ@gmail.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10297
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
dev-python/yapf/Manifest [new file with mode: 0644]
dev-python/yapf/metadata.xml [new file with mode: 0644]
dev-python/yapf/yapf-0.24.0.ebuild [new file with mode: 0644]

diff --git a/dev-python/yapf/Manifest b/dev-python/yapf/Manifest
new file mode 100644 (file)
index 0000000..b9394e3
--- /dev/null
@@ -0,0 +1 @@
+DIST yapf-0.24.0.tar.gz 145607 BLAKE2B 2f85130a28d7daea5f656bc3d46ef34291dfa3ac739170b8f7e120acbaa62c5f255c6c69d3b1775ceb13a63c09c239d207f227c41234bc676e131d0b4b958356 SHA512 daa61faaa2877af8bc8579b1f6a8e9cf177d1caf27e0430cc508b86b42d907186a0fe14913530368097b888f12c19fc601fbcc1c4e605341ca328e8bf40ea399
diff --git a/dev-python/yapf/metadata.xml b/dev-python/yapf/metadata.xml
new file mode 100644 (file)
index 0000000..2829952
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>horea.christ@gmail.com</email>
+               <name>Horea Christian</name>
+       </maintainer>
+               <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <longdescription lang="en">
+               YAPF is based off of 'clang-format', developed by Daniel Jasper.
+               In essence, the algorithm takes the code and reformats it to the best
+               formatting that conforms to the style guide, even if the original code
+               didn't violate the style guide. 
+       </longdescription>
+</pkgmetadata>
diff --git a/dev-python/yapf/yapf-0.24.0.ebuild b/dev-python/yapf/yapf-0.24.0.ebuild
new file mode 100644 (file)
index 0000000..599e8fc
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright 2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+inherit distutils-r1
+
+DESCRIPTION="A formatter for Python files"
+HOMEPAGE="https://github.com/google/yapf"
+SRC_URI="https://github.com/google/yapf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+python_test() {
+       esetup.py test
+}