summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-08-17 20:54:40 +0200
committerDavid Seifert <soap@gentoo.org>2020-08-17 20:54:40 +0200
commit7b4d8767a9e1190ac84c8a44c018d0c8ea7772ac (patch)
treee3c8c7b59f2f58e3d4910e219eb4c4dd981396fd
parentdev-python/pkgconfig: Add python 3.9 (diff)
downloadgentoo-7b4d8767.tar.gz
gentoo-7b4d8767.tar.bz2
gentoo-7b4d8767.zip
dev-python/cached-property: Add python 3.9
* Mask problematic 'test_threads_ttl_expiry' test fails with high core count: https://github.com/pydanny/cached-property/issues/24 Bug: https://bugs.gentoo.org/638250 Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--dev-python/cached-property/cached-property-1.5.1.ebuild22
-rw-r--r--dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch10
2 files changed, 23 insertions, 9 deletions
diff --git a/dev-python/cached-property/cached-property-1.5.1.ebuild b/dev-python/cached-property/cached-property-1.5.1.ebuild
index 01da4c80d703..04b4c9817683 100644
--- a/dev-python/cached-property/cached-property-1.5.1.ebuild
+++ b/dev-python/cached-property/cached-property-1.5.1.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1
@@ -14,15 +15,18 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ppc64 x86"
-DEPEND="
- test? (
- dev-python/freezegun[${PYTHON_USEDEP}]
- )"
-RDEPEND=""
+DEPEND="test? ( dev-python/freezegun[${PYTHON_USEDEP}] )"
distutils_enable_tests pytest
-src_install() {
- distutils-r1_src_install
+python_prepare_all() {
+ # bug 638250
+ eapply "${FILESDIR}"/${PN}-1.5.1-test-failure.patch
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
dodoc README.rst HISTORY.rst CONTRIBUTING.rst AUTHORS.rst
+ distutils-r1_python_install_all
}
diff --git a/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch b/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch
new file mode 100644
index 000000000000..03fabd2900ca
--- /dev/null
+++ b/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch
@@ -0,0 +1,10 @@
+--- a/tests/test_cached_property.py
++++ b/tests/test_cached_property.py
+@@ -191,6 +191,7 @@
+ self.assert_cached(check, 2)
+ self.assert_cached(check, 2)
+
++ @unittest.skip("Gentoo Bug #638250")
+ def test_threads_ttl_expiry(self):
+ Check = CheckFactory(self.cached_property_factory(ttl=100000), threadsafe=True)
+ check = Check()