dev-python/pydocstyle: new package
authorZac Medico <zmedico@gentoo.org>
Sat, 13 Oct 2018 20:55:13 +0000 (13:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 13 Oct 2018 22:35:12 +0000 (15:35 -0700)
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

dev-python/pydocstyle/Manifest [new file with mode: 0644]
dev-python/pydocstyle/metadata.xml [new file with mode: 0644]
dev-python/pydocstyle/pydocstyle-2.1.1.ebuild [new file with mode: 0644]

diff --git a/dev-python/pydocstyle/Manifest b/dev-python/pydocstyle/Manifest
new file mode 100644 (file)
index 0000000..4fae544
--- /dev/null
@@ -0,0 +1 @@
+DIST pydocstyle-2.1.1.tar.gz 55760 BLAKE2B e470b006b5db04c4bed5c3145b14b949980c71d1dd91dbe34d49599063aaf1cb1d0842dfb992e5d471436446455bde2d309ee573826c039540fa99adba3f828b SHA512 f23939e0350094c67565613bab4ddf285dda5a7379e6ac2493953d6e60ab75588143fd374715765d2aa0728e7117d02e91312dbbe5a9cad28aa8e8e7f68e3bc4
diff --git a/dev-python/pydocstyle/metadata.xml b/dev-python/pydocstyle/metadata.xml
new file mode 100644 (file)
index 0000000..b9e3385
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>zmedico@gentoo.org</email>
+               <name>Zac Medico</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="pypi">pydocstyle</remote-id>
+               <remote-id type="github">PyCQA/pydocstyle</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-python/pydocstyle/pydocstyle-2.1.1.ebuild b/dev-python/pydocstyle/pydocstyle-2.1.1.ebuild
new file mode 100644 (file)
index 0000000..5095389
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python docstring style checker"
+HOMEPAGE="https://github.com/PyCQA/pydocstyle"
+SRC_URI="https://github.com/PyCQA/pydocstyle/archive/${PV}.tar.gz -> ${P}.tar.gz"
+# pypi tarball excludes unit tests
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+# TODO: investigate unit test failures
+RESTRICT="test"
+
+RDEPEND="$(python_gen_cond_dep 'dev-python/configparser[${PYTHON_USEDEP}]' -2)
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       dev-python/six[${PYTHON_USEDEP}]
+       dev-python/snowballstemmer[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+       test? (
+               >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
+               >=dev-python/pytest-3.0.2[${PYTHON_USEDEP}]
+               >=dev-python/pytest-pep8-1.0.6[${PYTHON_USEDEP}]
+               virtual/python-pathlib[${PYTHON_USEDEP}]
+       )"
+
+python_prepare_all() {
+       distutils-r1_python_prepare_all
+       sed -e 's:^\(def \)\(install_package\):\1_\2:' \
+               -e 's:^pytestmark =:#\0:' \
+               -i src/tests/test_integration.py || die
+}
+
+python_test() {
+       py.test -v src/tests || die "tests failed with ${EPYTHON}"
+}