dev-python/blinker: EAPI 8, PEP517

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2022-05-12 22:16:21 +02:00
parent 31e8023721
commit a90a4b7a4f
2 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="Fast, simple object-to-object and broadcast signaling"
HOMEPAGE="
https://pythonhosted.org/blinker/
https://github.com/pallets-eco/blinker/
https://pypi.org/project/blinker/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="doc"
distutils_enable_tests pytest
PATCHES=(
# https://github.com/pallets-eco/blinker/pull/60
"${FILESDIR}"/${P}-pytest.patch
)
python_install_all() {
use doc && HTML_DOCS=( docs/html/. )
distutils-r1_python_install_all
}

View File

@@ -0,0 +1,31 @@
From 8238e16c699ce7f99f5ff3f80d03d332d72015f8 Mon Sep 17 00:00:00 2001
From: pgajdos <pgajdos@suse.cz>
Date: Wed, 8 Jul 2020 15:22:19 +0200
Subject: [PATCH] use pytest instead of deprecated nose
---
tests/test_signals.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_signals.py b/tests/test_signals.py
index 2d6a65a..e74db47 100644
--- a/tests/test_signals.py
+++ b/tests/test_signals.py
@@ -4,7 +4,7 @@
import blinker
-from nose.tools import assert_raises
+import pytest
jython = sys.platform.startswith('java')
@@ -227,7 +227,7 @@ def receiver(sender, **kw):
pass
sig = blinker.Signal()
- assert_raises(TypeError, sig.connect, receiver)
+ pytest.raises(TypeError, sig.connect, receiver)
assert not sig.receivers
assert not sig._by_receiver
assert sig._by_sender == {blinker.base.ANY_ID: set()}