summaryrefslogtreecommitdiff
path: root/dev-python/dugong
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/dugong
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/dugong')
-rw-r--r--dev-python/dugong/Manifest8
-rw-r--r--dev-python/dugong/dugong-3.7.1.ebuild32
-rw-r--r--dev-python/dugong/dugong-3.7.ebuild36
-rw-r--r--dev-python/dugong/files/dugong-3.7-test-html-escape.patch46
-rw-r--r--dev-python/dugong/metadata.xml12
5 files changed, 134 insertions, 0 deletions
diff --git a/dev-python/dugong/Manifest b/dev-python/dugong/Manifest
new file mode 100644
index 000000000000..5f60b5cb864c
--- /dev/null
+++ b/dev-python/dugong/Manifest
@@ -0,0 +1,8 @@
+AUX dugong-3.7-test-html-escape.patch 1765 SHA256 16f992c7afbd58616874d0fa16633e91f7614b5d624dbda09baa2f4ebcee4a77 SHA512 8a341199805baef25e4d8316e7a5f290b5e33c97b53a53f19da03eb55035feed2ba7709e3429ac69c906af86c63dbc21835c3ccef4aa713ffd09b3d1643b7f3d WHIRLPOOL 8f6539010cfc1e817f9e83eeaf18d28626af89f23014c2a701ed24a7b594373cc051f26c4802bfca4914b4f58281c0b5016edacc6e748dcb22daf68bb78b8b3d
+DIST dugong-3.7.1.tar.bz2 194243 SHA256 3bf01631c4ccd1be2b07aa0adcda94b8627457207cd5cd7f8438c0d7fad63509 SHA512 85c276bba85d650bf0baa6257bf0872cb2da546a23d19e0c94cc15c95721a8d9f6392db0e64b38ab2e801803e3ab7908e6a931d18736d33c87138eca35b4f27c WHIRLPOOL 5d229cc20ce27f295068ce92d77092e69f21ce72ddd511478b902e421e9061d79df1325b67abe0205ca21b1bec559a5069f74c56ed0fa1cbb60213b473c15f07
+DIST dugong-3.7.tar.bz2 193975 SHA256 68f7810742e1c54a5cddfa49992d416704c13b25263bd3278f7581cbc2adb2e1 SHA512 f6e637946ec5f402a21dc40f08ab187bed281b4b7c27c056651eac049d9aaf4c952bfa5e19c05db6cac2d284cf7dbd47250b82cdbcac998971fd10466a47fe21 WHIRLPOOL 3ee51fc0f085f94f64d04b6ef04fb69db8f4a569347eee4fbb1e18727343752dbf6b7df080776ca38b87f49d8495b5bd6361eb25f3cd12b4bc54b911be96a87c
+EBUILD dugong-3.7.1.ebuild 780 SHA256 540ee7c6a906bbe70c31a40108555abb8890b320a584d0b765aa5350f8bc85bf SHA512 6fbab44fee8b135c83fd1223cb1e4aa41db5461819daff48deee4d6347528f0612ed05d91b343782ea1d8a5817e56a4cef102ef5e1b4a3af5502a2c016653283 WHIRLPOOL 4b78fa26229d6897798855b3716ce8d9b2f8ac6ae6183f3cbb327bb5c688b6b07c67522818073666941c0efb91def8791d90c6b1cca4d25f40cf9cf1d4788a92
+EBUILD dugong-3.7.ebuild 834 SHA256 bf914ef793ac2d92d83a64ded4d5100c4b93c0c7e9c3db1c48e2f7e5a476e1b2 SHA512 598b1e257aa1fa05c5135ba138fdf99b3f47f2a2855614206aa67095d27b6ad538dd24d2670b572abed386db3f5e2e691a6130a70b03a523c2af0eb7ab1d2211 WHIRLPOOL 21bde836b9ae13944bdd84efce452d34e812830f4bd39e3d1e25b0f22a5a03334f9f07cf3887a24fc4423b5fe9fe4d075b060373604a1218d9c6c86ea56ef4e1
+MISC ChangeLog 3240 SHA256 4068be61818a79fd9e8276f097f4432deb3014c22148d038dd68064d3da7a81f SHA512 bf537c076185f11030d7ae11c78c1fd8a2cfe861147acf1a9cf743ef33f7471c68cd4181463e21f753eca42f4954a914687e0a07db64a221e108ede6b27f362a WHIRLPOOL 91ba998cc672c43a098c8a5528e821368d6aa1e53282b22f6c2d664db954b00a9800d121f7508d117a89b2685a200105438aa7fb6503f18c75d0de72f1aac32c
+MISC ChangeLog-2015 2001 SHA256 03fe06b256da708ce56dac8ce84a39aa221b79067d27dff103344732d0fb7edb SHA512 98edb7674ed32f5e6fa62a856d956c2dc1cbe1455acc759569fa2190a1a1d15df6aca48718cc797b6e8234b0911243f89b1db0022c45a02d160f94ca085ce335 WHIRLPOOL bad3116519cb90b9204894846aabbdadd5ebdfe4f685eb7a14dfcfdbbb49524338aa1c1ddee7d11c35f0547666c5439047007a8d08a819f69bfcedf9130c87e0
+MISC metadata.xml 386 SHA256 45b08ac16905a92aee10b7201cef39990c03168d03e6a45072fe3925f04632a1 SHA512 9ac2081eb11077d2d9d7318410053fca1855abc8fe288bc18de829c1874e38c649620c56e2a7eb9fe29e41bed8dcb7c3327a2203c60511ab233a58d93f542db2 WHIRLPOOL 8c6d2191b5ef2a115ad658eebd5f07cb9f596df1d769d0d3ea67056861c0b2887115ab10d12286f84f13bdddd2b42949837a9f5d9843452c19a3dd887e1457c4
diff --git a/dev-python/dugong/dugong-3.7.1.ebuild b/dev-python/dugong/dugong-3.7.1.ebuild
new file mode 100644
index 000000000000..d5bddcb825e4
--- /dev/null
+++ b/dev-python/dugong/dugong-3.7.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library for communicating with HTTP 1.1 servers"
+HOMEPAGE="https://bitbucket.org/nikratio/python-dugong/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-catchlog[${PYTHON_USEDEP}]
+ )"
+
+python_test() {
+ py.test -v || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/html/. )
+ use examples && dodoc -r examples
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/dugong/dugong-3.7.ebuild b/dev-python/dugong/dugong-3.7.ebuild
new file mode 100644
index 000000000000..326f69c1fc63
--- /dev/null
+++ b/dev-python/dugong/dugong-3.7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library for communicating with HTTP 1.1 servers"
+HOMEPAGE="https://bitbucket.org/nikratio/python-dugong/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples test"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-catchlog[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-html-escape.patch
+)
+
+python_test() {
+ py.test -v || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/html/. )
+ use examples && dodoc -r examples
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/dugong/files/dugong-3.7-test-html-escape.patch b/dev-python/dugong/files/dugong-3.7-test-html-escape.patch
new file mode 100644
index 000000000000..ba2ee587d0c9
--- /dev/null
+++ b/dev-python/dugong/files/dugong-3.7-test-html-escape.patch
@@ -0,0 +1,46 @@
+# HG changeset patch
+# User Zac Medico <zmedico@gentoo.org>
+# Date 1494468556 25200
+# Branch test-quote-html
+# Node ID b8a28438442ec12cd4067fd3240d9afc8e6998da
+# Parent a986296769f3fc4daa0f29fe28b857f43d05634d
+Use html.escape for python3.6 compat
+
+https://bitbucket.org/nikratio/python-dugong/pull-requests/3
+
+diff --git a/test/test_dugong.py b/test/test_dugong.py
+--- a/test/test_dugong.py
++++ b/test/test_dugong.py
+@@ -24,7 +24,7 @@
+ from dugong import (HTTPConnection, BodyFollowing, CaseInsensitiveDict, _join,
+ ConnectionClosed)
+ import dugong
+-from http.server import BaseHTTPRequestHandler, _quote_html
++from http.server import BaseHTTPRequestHandler
+ from io import TextIOWrapper
+ from base64 import b64encode
+ import http.client
+@@ -34,6 +34,7 @@
+ import ssl
+ import re
+ import os
++import html
+ import hashlib
+ import threading
+ import socketserver
+@@ -1163,9 +1164,12 @@
+ message = shortmsg
+ explain = longmsg
+ self.log_error("code %d, message %s", code, message)
+- # using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201)
+- content = (self.error_message_format % {'code': code, 'message': _quote_html(message),
+- 'explain': explain}).encode('utf-8', 'replace')
++ # HTML encode to prevent Cross Site Scripting attacks (see bug #1100201)
++ content = (self.error_message_format % {
++ 'code': code,
++ 'message': html.escape(message, quote=False),
++ 'explain': explain
++ }).encode('utf-8', 'replace')
+ self.send_response(code, message)
+ self.send_header("Content-Type", self.error_content_type)
+ self.send_header("Content-Length", str(len(content)))
diff --git a/dev-python/dugong/metadata.xml b/dev-python/dugong/metadata.xml
new file mode 100644
index 000000000000..2ae422c40102
--- /dev/null
+++ b/dev-python/dugong/metadata.xml
@@ -0,0 +1,12 @@
+<?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>
+ <upstream>
+ <remote-id type="pypi">dugong</remote-id>
+ <remote-id type="bitbucket">nikratio/python-dugong</remote-id>
+ </upstream>
+</pkgmetadata>