dev-python/pyshark: bump and dep fix
authorRick Farina <zerochaos@gentoo.org>
Fri, 17 May 2019 02:56:42 +0000 (22:56 -0400)
committerRick Farina <zerochaos@gentoo.org>
Fri, 17 May 2019 02:56:52 +0000 (22:56 -0400)
bug #683686
bug #683682

Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
dev-python/pyshark/Manifest
dev-python/pyshark/pyshark-0.3.7.2-r1.ebuild [moved from dev-python/pyshark/pyshark-0.3.7.2.ebuild with 97% similarity]
dev-python/pyshark/pyshark-0.4.2.3.ebuild [new file with mode: 0644]

index 498f737dfc1745331d0d7f3e75b6a6b56a1d3665..fddea2e2139106654dd735b0b0e755427edb92dc 100644 (file)
@@ -1 +1,2 @@
 DIST pyshark-0.3.7.2.tar.gz 27232 BLAKE2B b93ee24fb29990b0ab455935e773e4844c26761c2515d1254c8e72d24d70be95aa17a590cc1f5b39bb5f76db624fb7c40d06e64731948ee75a5b8e2008830968 SHA512 dbd97665fae7d3067582bf7616e025b0c5e5fa14cacdaca59c89b4e70feb3017f2d8c7d899a70c0c8707589e4735b9283914bb6ccbf432e9072c64d7e957bc15
+DIST pyshark-0.4.2.3.tar.gz 29363 BLAKE2B 91463f725eb893c3c7f7442eec5e0a8304bb8f2ecbd0ea80582c49bfd8538a5fcdb1d5d1ab2373f8e67684c78c8852af697dadf8ff041d42f8ff18a8954a6248 SHA512 bbef857dad5e5141e0ec7c04dba9faca81b17d67a7151959e9935577428cd1415e173e9c7ededff46f8621bcbbdfbe7a96ca5cfd65d7143fb6f235c0167964b6
similarity index 97%
rename from dev-python/pyshark/pyshark-0.3.7.2.ebuild
rename to dev-python/pyshark/pyshark-0.3.7.2-r1.ebuild
index a2ebdaf0d066295b9368293d5605329f6b45aa1e..761cfea65af236cc7ab057a328e39d508d0b3698 100644 (file)
@@ -25,7 +25,7 @@ RDEPEND="
        dev-python/lxml[${PYTHON_USEDEP}]
        dev-python/trollius[${PYTHON_USEDEP}]
        virtual/python-futures[${PYTHON_USEDEP}]
-       net-analyzer/wireshark"
+       net-analyzer/wireshark[tshark]"
 DEPEND="
        dev-python/setuptools[${PYTHON_USEDEP}]
        test? (
diff --git a/dev-python/pyshark/pyshark-0.4.2.3.ebuild b/dev-python/pyshark/pyshark-0.4.2.3.ebuild
new file mode 100644 (file)
index 0000000..5e62345
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A Python wrapper for tshark output parsing"
+HOMEPAGE="https://pypi.org/project/pyshark/ https://github.com/KimiNewt/pyshark"
+# pypi tarball is missing tests
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/KimiNewt/pyshark/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+# See pyshark.egg-info/requires.txt
+RDEPEND="
+       dev-python/py[${PYTHON_USEDEP}]
+       dev-python/logbook[${PYTHON_USEDEP}]
+       dev-python/lxml[${PYTHON_USEDEP}]
+       dev-python/trollius[${PYTHON_USEDEP}]
+       virtual/python-futures[${PYTHON_USEDEP}]
+       net-analyzer/wireshark[tshark]"
+DEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               ${RDEPEND}
+               dev-python/pytest[${PYTHON_USEDEP}]
+       )
+"
+
+S="${WORKDIR}/${P}/src"
+
+python_prepare_all() {
+       # Test fails unless portage can execute /usr/bin/dumpcap
+       # https://github.com/KimiNewt/pyshark/issues/197
+       rm "${WORKDIR}/${P}/tests/capture/test_inmem_capture.py" || die
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       cd "${WORKDIR}/${P}/tests" || die
+       py.test -v || die
+}