diff --git a/dev-python/aspectlib/Manifest b/dev-python/aspectlib/Manifest new file mode 100644 index 0000000..df45009 --- /dev/null +++ b/dev-python/aspectlib/Manifest @@ -0,0 +1 @@ +DIST aspectlib-1.5.2.tar.gz 163704 BLAKE2B a4bc51fc75ec1d3dd659e1de78b80c16145f927ee1af5cb41ab9a049051683da708ce63efaa4ad767066ed4cc463108f8be74ebc4145b868d8a5ed07b2a73652 SHA512 999f7e893aee15d5bd89ae9aa45b82b639aae777ec5e946f7f0ee5aa7c2153d6a05ae0f1e95b7f5cdb4f4d12f188093479d9c50df6c7521003e83289cabb494b diff --git a/dev-python/aspectlib/aspectlib-1.5.2.ebuild b/dev-python/aspectlib/aspectlib-1.5.2.ebuild new file mode 100644 index 0000000..843c2fa --- /dev/null +++ b/dev-python/aspectlib/aspectlib-1.5.2.ebuild @@ -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 +} diff --git a/dev-python/aspectlib/files/Remove-tornado-6-test-constraint.patch b/dev-python/aspectlib/files/Remove-tornado-6-test-constraint.patch new file mode 100644 index 0000000..a4c8256 --- /dev/null +++ b/dev-python/aspectlib/files/Remove-tornado-6-test-constraint.patch @@ -0,0 +1,43 @@ +From 7dccb198dfb426f529b81a28a755f3c02f8b50cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= +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 + diff --git a/dev-python/aspectlib/metadata.xml b/dev-python/aspectlib/metadata.xml new file mode 100644 index 0000000..ab96243 --- /dev/null +++ b/dev-python/aspectlib/metadata.xml @@ -0,0 +1,11 @@ + + + + + parona@protonmail.com + Alfred Wingate + + + ionelmc/python-aspectlib + +