dev-python/aspectlib: add for dev-python/pytest-benchmark

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2021-05-21 19:31:05 +03:00
parent a487a3fbdf
commit 25ab4df4de
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
4 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST aspectlib-1.5.2.tar.gz 163704 BLAKE2B a4bc51fc75ec1d3dd659e1de78b80c16145f927ee1af5cb41ab9a049051683da708ce63efaa4ad767066ed4cc463108f8be74ebc4145b868d8a5ed07b2a73652 SHA512 999f7e893aee15d5bd89ae9aa45b82b639aae777ec5e946f7f0ee5aa7c2153d6a05ae0f1e95b7f5cdb4f4d12f188093479d9c50df6c7521003e83289cabb494b

View File

@ -0,0 +1,47 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1
DESCRIPTION="An aspect-oriented programming, monkey-patch and decorators library."
HOMEPAGE="https://github.com/ionelmc/python-aspectlib"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc test"
RESTRICT="!test? ( test )"
RDEPEND="dev-python/fields[${PYTHON_USEDEP}]"
DEPEND="
dev-python/sphinx-py3doc-enhanced-theme[${PYTHON_USEDEP}]
test? (
${RDEPEND}
dev-python/process-tests[${PYTHON_USEDEP}]
www-servers/tornado[${PYTHON_USEDEP}]
)
"
BDEPEND="
dev-python/sphinx
"
distutils_enable_tests pytest
PATCHES=( "${FILESDIR}/Remove-tornado-6-test-constraint.patch" )
python_compile_all() {
if use doc; then
sphinx-build -b html docs docs/_build/html || die
fi
sphinx-build -b man docs docs/_build/man || die
}
python_install_all() {
use doc && HTML_DOCS=( docs/_build/html/. )
doman docs/_build/man/*
distutils-r1_python_install_all
}

View File

@ -0,0 +1,43 @@
From 7dccb198dfb426f529b81a28a755f3c02f8b50cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
Date: Sun, 2 May 2021 09:50:43 +0300
Subject: [PATCH] Remove tornado<6 test constraint. Ref #15.
---
tests/test_integrations_py3.py | 5 ++++-
tox.ini | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/test_integrations_py3.py b/tests/test_integrations_py3.py
index e025eac..596589d 100644
--- a/tests/test_integrations_py3.py
+++ b/tests/test_integrations_py3.py
@@ -36,7 +36,10 @@ def test_decorate_tornado_coroutine():
@gen.coroutine
@debug.log(print_to=buf, module=False, stacktrace=2, result_repr=repr)
def coro():
- yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
+ if hasattr(gen, 'Task'):
+ yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
+ else:
+ yield gen.sleep(0.01)
return "result"
loop = ioloop.IOLoop.current()
diff --git a/tox.ini b/tox.ini
index c9cbc83..1bd1d1c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -51,7 +51,8 @@ deps =
pytest-clarity
pytest-cov
pytest-travis-fold
- tornado<6.0
+ six
+ tornado
commands =
{posargs:pytest --cov --cov-report=term-missing -vv --ignore=src}
--
2.26.3

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>parona@protonmail.com</email>
<name>Alfred Wingate</name>
</maintainer>
<upstream>
<remote-id type="github">ionelmc/python-aspectlib</remote-id>
</upstream>
</pkgmetadata>