summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2020-05-31 21:06:49 -0700
committerBrian Dolbec <dolsen@gentoo.org>2020-06-01 15:57:32 -0700
commit5e038299cefa7a85cc0536c18c4fc61ef2ecd104 (patch)
tree13bd9b0936c4308d13fed118efb6e0e70010941e /dev-python/klein
parentdev-python/tubes: New pkg, dep for dev-python/klien (diff)
downloadgentoo-5e038299cefa7a85cc0536c18c4fc61ef2ecd104.tar.gz
gentoo-5e038299cefa7a85cc0536c18c4fc61ef2ecd104.tar.bz2
gentoo-5e038299cefa7a85cc0536c18c4fc61ef2ecd104.zip
dev-python/klein: New pkg, dep of dev-util/buildbot-badges
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'dev-python/klein')
-rw-r--r--dev-python/klein/Manifest1
-rw-r--r--dev-python/klein/klein-19.6.0.ebuild57
-rw-r--r--dev-python/klein/metadata.xml24
3 files changed, 82 insertions, 0 deletions
diff --git a/dev-python/klein/Manifest b/dev-python/klein/Manifest
new file mode 100644
index 000000000000..1d9a9e8c1719
--- /dev/null
+++ b/dev-python/klein/Manifest
@@ -0,0 +1 @@
+DIST klein-19.6.0.tar.gz 100867 BLAKE2B 2d03a5040d7f470bd73b25a66a1dbb2d6278a12afd7ffeffe0055b2d8bf88d5fd6d97e08bdbc185fbfcd34aa0589f79d79488cba77b4b08430dbafd8ba5e0afe SHA512 c0853333269d4d79206446bc7ac333f536eb9dbeea0ada65b23610e4e8a35208820ef1bac78c17a4e71c22ed2c06f5467ce6c59666dc36fde3e4c0843ed69549
diff --git a/dev-python/klein/klein-19.6.0.ebuild b/dev-python/klein/klein-19.6.0.ebuild
new file mode 100644
index 000000000000..f89fedf523f1
--- /dev/null
+++ b/dev-python/klein/klein-19.6.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="micro-framework for developing production-ready web services with Python"
+HOMEPAGE="https://pypi.org/project/klein https://github.com/twisted/klein"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/treq[${PYTHON_USEDEP}]
+ )
+"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/hyperlink[${PYTHON_USEDEP}]
+ dev-python/incremental[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/tubes[${PYTHON_USEDEP}]
+ dev-python/twisted[${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+
+python_prepare_all() {
+ # nuke irreleveant test dep
+ sed -e 's/"typing",//' \
+ -i setup.py || die
+ # known test fail: https://github.com/twisted/klein/issues/339
+ sed -e 's/big world/big+world/' \
+ -e 's/4321)]/4321.0)]/' \
+ -e 's/not a number/not+a+number/' \
+ -i src/klein/test/test_form.py || die
+
+ distutils-r1_python_prepare_all
+}
+python_test() {
+ distutils_install_for_testing
+
+ pytest -v ||
+ die "Tests failed with ${EPYTHON}"
+}
diff --git a/dev-python/klein/metadata.xml b/dev-python/klein/metadata.xml
new file mode 100644
index 000000000000..dab0ec77e4d3
--- /dev/null
+++ b/dev-python/klein/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dolsen@gentoo.org</email>
+ <name>Brian Dolbec</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>hawkowl@twistedmatrix.com</email>
+ <name>Amber Brown</name>
+ </maintainer>
+ <remote-id type="pypi">klein</remote-id>
+ <remote-id type="github">twisted/klein</remote-id>
+ </upstream>
+ <longdescription>
+ Klein is a micro-framework for developing production-ready web services
+ with Python. It is 'micro' in that it has an incredibly small API
+ similar to Bottle and Flask. It is not 'micro' in that it depends on
+ things outside the standard library. This is primarily because it is
+ built on widely used and well tested components like Werkzeug and
+ Twisted.
+ </longdescription>
+</pkgmetadata>