Merge pull request #269 from fkmclane/mitmproxy3

Review: Mitmproxy3
This commit is contained in:
Anton Bolshakov 2018-02-07 08:00:03 +08:00 committed by GitHub
commit c24bff0bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 185 additions and 1 deletions

1
dev-python/h11/Manifest Normal file
View file

@ -0,0 +1 @@
DIST h11-0.7.0.zip 105979 SHA256 1c0fbb1cba6f809fe3e6b27f8f6d517ca171f848922708871403636143d530d9 SHA512 abf9b8f7f12870804539049c3bfebbbe476e394636aed9967aa725d501fff983f28c7f14b4b882c17914d00fe3e74417ff8922128d0e4e07bf042a7db6d0b100 WHIRLPOOL d67bb91c75ebab0d93f809185191457b57772e1494b379721970a46c1477b6c1547c0eecf12692e6a5ee148b095c659cc303327dcf4a20bb9a844bb1a629cb1d

View file

@ -0,0 +1,21 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
inherit distutils-r1
DESCRIPTION="A pure-Python implementation of HTTP/1.1 inspired by hyper-h2"
HOMEPAGE="https://pypi.python.org/pypi/h11"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RESTRICT="test"
RDEPEND=""
DEPEND="${RDEPEND}"

View file

@ -0,0 +1 @@
DIST ldap3-2.4.1.tar.gz 345220 SHA256 e8fe0d55a8cecb725748c831ffac2873df94c05b2d7eb867ea167c0500bbc6a8 SHA512 716671c2d07c53d1953aab4668562a1b59a1e642b19d50f3cf05d44c74b6848a34b4197aa2c77f5b1d6b556ec0ca473b0495c24da74e2395aa20dffc8a0a360d WHIRLPOOL 5bd3078804bf27ea9a7f363df182e8bc0d9aa57b813f4bc2bc1762560dd8cb37a7143ce03897d6ae563942964ec277e191faeed893dd4952ecd3c48cebc55072

View file

@ -0,0 +1,31 @@
# Copyright 1999-2017 Gentoo Foundation
# 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="A strictly RFC 4511 conforming LDAP V3 pure Python client"
HOMEPAGE="https://github.com/cannatag/ldap3 https://pypi.python.org/pypi/ldap3"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
# The tests are a mess, and the test config is not included in the
# PyPi tarball (see https://travis-ci.org/cannatag/ldap3 and
# https://github.com/cannatag/ldap3/blob/master/test/config.py).
RESTRICT="test"
RDEPEND=">=dev-python/pyasn1-0.1.8[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/nose[${PYTHON_USEDEP}] )
"
python_test() {
nosetests -v -s test || die
}

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<longdescription lang="en">
ldap3 is a strictly RFC 4511 conforming LDAP V3 pure Python client. The same codebase works with Python, Python 3, PyPy and PyPy3.
This project was formerly named python3-ldap. The name has been changed to avoid confusion with the python-ldap library.
</longdescription>
<upstream>
<remote-id type="pypi">ldap3</remote-id>
<remote-id type="github">cannatag/ldap3</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1 @@
DIST wsproto-0.11.0.tar.gz 41179 SHA256 02f214f6bb43cda62a511e2e8f1d5fa4703ed83d376d18d042bd2bbf2e995824 SHA512 583e030dc88971b3733e5e84e5fbaa70d6043d01485cabbbf45470baa31e4f511aea55e108132fc298aeae0031542af7bdd22b7ae25b11832179025a2fde4bdd WHIRLPOOL 4e6e97f721e2fb7591597f61336cbd0bd946de0aea834758d946ad7ae658ef7d74d97ba0f33744803cf1fe3b766ee9a2924255ee615602085d4521e02b371d4a

View file

@ -0,0 +1,22 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
inherit distutils-r1
DESCRIPTION="WebSockets state-machine based protocol implementation"
HOMEPAGE="https://pypi.python.org/pypi/wsproto"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RESTRICT="test"
RDEPEND=">=dev-python/h11-0.7.0[${PYTHON_USEDEP}]
virtual/python-enum34[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"

View file

@ -1 +1,2 @@
DIST mitmproxy-2.0.2.tar.gz 28498343 SHA256 42e8cbcd27b85e60a165d1a28692098181813bbd9d7731a42b2cda68824c6c9d SHA512 8a38340b3b1dd73c99c9e9b06a59bff78a23b2a851e1032ee0b7354ac46c834a3d005a67dc5238030570719eb5f842cb2a8ce64ffc7c5a01cbfa9a9511c08e66 WHIRLPOOL 8c70b03b4838e7a0ad67de918b234bbcb22c57d4f627fef8cb646b3d2aac462af11aec282062874c7bf2d2a4a00424cacc4dacfa947596bef1cf3af83643afc3
DIST mitmproxy-2.0.2.tar.gz 28498343 BLAKE2B f79eac8dd9e060787e7cd049983ce23bd7b6025efe1edfcd9a150611f5e08fa7a869d1c203e2d4d8e7ae3539d9e63d6665fb282f75392afcd70cdfe6cca87223 SHA512 8a38340b3b1dd73c99c9e9b06a59bff78a23b2a851e1032ee0b7354ac46c834a3d005a67dc5238030570719eb5f842cb2a8ce64ffc7c5a01cbfa9a9511c08e66
DIST mitmproxy-3.0.0rc2.tar.gz 28490469 BLAKE2B 70cf534fbc242904efb07acc8cc750a987d0a179d6c7c09427b4937c8dcc792370f8929daafa8cfbe8ce76f8ba61484a1c671c8832a550d887bba0c6de882947 SHA512 3521e2c3c678e6d819133ed61c89eae6e8f363e8489bd6f8361c9ee27b9dd0e933bb9e5965f7f83eb0a7c37a35af051b42fdab1ced1fac3d87244840759bb1f8

View file

@ -0,0 +1,90 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{4,5} )
inherit distutils-r1 versionator
DESCRIPTION="An interactive, SSL-capable, man-in-the-middle HTTP proxy"
HOMEPAGE="http://mitmproxy.org/"
MY_PV="$(get_version_component_range 1-3)$(get_version_component_range 4-5)"
MY_P="${PN}-${MY_PV}"
SRC_URI="https://github.com/mitmproxy/mitmproxy/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples test"
RDEPEND="
>=dev-python/blinker-1.4[${PYTHON_USEDEP}] <dev-python/blinker-1.5
>=dev-python/brotlipy-0.5.1[${PYTHON_USEDEP}] <dev-python/brotlipy-0.8
>=dev-python/certifi-2015.11.20.1[${PYTHON_USEDEP}]
>=dev-python/click-6.2[${PYTHON_USEDEP}] <dev-python/click-7
>=dev-python/cryptography-2.1.4[${PYTHON_USEDEP}] <dev-python/cryptography-2.2
>=dev-python/hyper-h2-3.0[${PYTHON_USEDEP}] <dev-python/hyper-h2-4
>=dev-python/hyperframe-5.0[${PYTHON_USEDEP}] <dev-python/hyperframe-6
>=dev-python/kaitaistruct-0.7[${PYTHON_USEDEP}] <dev-python/kaitaistruct-0.8
>=dev-python/ldap3-2.4[${PYTHON_USEDEP}] <dev-python/ldap3-2.5
>=dev-python/passlib-1.6.5[${PYTHON_USEDEP}] <dev-python/passlib-1.8
>=dev-python/pyasn1-0.3.1[${PYTHON_USEDEP}] <dev-python/pyasn1-0.5
>=dev-python/pyopenssl-17.2[${PYTHON_USEDEP}] <dev-python/pyopenssl-17.6
>=dev-python/pyparsing-2.1.3[${PYTHON_USEDEP}] <dev-python/pyparsing-2.3
>=dev-python/pyperclip-1.5.22[${PYTHON_USEDEP}] <dev-python/pyperclip-1.7
>=dev-python/requests-2.9.1[${PYTHON_USEDEP}] <dev-python/requests-3
>=dev-python/ruamel-yaml-0.13.2[${PYTHON_USEDEP}] <dev-python/ruamel-yaml-0.16
>=dev-python/sortedcontainers-1.5.4[${PYTHON_USEDEP}] <dev-python/sortedcontainers-1.6
>=www-servers/tornado-4.3[${PYTHON_USEDEP}] <www-servers/tornado-4.6
>=dev-python/urwid-1.3.1[${PYTHON_USEDEP}] <dev-python/urwid-1.4
>=dev-python/wsproto-0.11.0[${PYTHON_USEDEP}] <dev-python/wsproto-0.12.0
examples? ( >=dev-python/pillow-4.3[${PYTHON_USEDEP}] <dev-python/pillow-5.1
dev-python/beautifulsoup:4[${PYTHON_USEDEP}] <dev-python/beautifulsoup-4.7:4
)
"
DEPEND="${RDEPEND}
test? (
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
>=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
)
doc? ( dev-python/sphinx dev-python/sphinxcontrib-documentedlist )"
#fixme: bump it too
# =www-servers/pathod-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
S="${WORKDIR}/${MY_P}"
python_prepare() {
#we allow to use 34 until 35 is stable
hack_python34() {
if [[ `pwd` == *python3_4 ]] ; then
# do not use circular imports
sed -i -e "s|^from mitmproxy import contentviews|#from mitmproxy import contentviews|" mitmproxy/contentviews/auto.py || die "failed to sed"
fi
}
python_foreach_impl hack_python34
}
python_test() {
nosetests -v || die "Tests fail with ${EPYTHON}"
}
python_compile_all() {
use doc && emake -C docs html
}
python_install_all() {
local DOCS=( CHANGELOG CONTRIBUTORS )
use doc && local HTML_DOCS=( docs/_build/html. )
use examples && local EXAMPLES=( examples/. )
distutils-r1_python_install_all
}
pkg_postinst() {
if [[ ${PYTHON_TARGETS} == *python3_4* ]] ; then
ewarn "Attention: Python 3_4 is not officially supported by this version"
ewarn
fi
}