diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-12-15 17:34:22 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-12-15 17:59:06 +0100 |
commit | 720627c5a2848c60fbbf9518cc4a3babf4554b73 (patch) | |
tree | 2939957095b9e460bb84229e7e5fc66fdb668cec /dev-python/lazy-object-proxy | |
parent | dev-python/bcrypt: Bump to 4.1.2 (diff) | |
download | gentoo-720627c5a2848c60fbbf9518cc4a3babf4554b73.tar.gz gentoo-720627c5a2848c60fbbf9518cc4a3babf4554b73.tar.bz2 gentoo-720627c5a2848c60fbbf9518cc4a3babf4554b73.zip |
dev-python/lazy-object-proxy: Bump to 1.10.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/lazy-object-proxy')
3 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/lazy-object-proxy/Manifest b/dev-python/lazy-object-proxy/Manifest index 2aed049b9fb2..fb8dbd3a595a 100644 --- a/dev-python/lazy-object-proxy/Manifest +++ b/dev-python/lazy-object-proxy/Manifest @@ -1 +1,2 @@ +DIST lazy-object-proxy-1.10.0.tar.gz 43271 BLAKE2B f2146db4ebb3e48b4af36fa56a1656c3316896eab9e9b9c5450106b18df27a48a04c7ab8609384caf81899f956a20990e54818c836bd20b607766652d9797eca SHA512 0693a2b6d13909580e7b568a030b884f84fc1578b17e49ac4246572e3e8b18c05a2613572f24b908630528ecb606d149a106b46d079f2c42ced5172146e413c5 DIST lazy-object-proxy-1.9.0.tar.gz 42830 BLAKE2B 565315a3e855bc5335af717d1edc947fef57514c06036280d1f4666ab9642cf7e7b4bb145da87cbca14d9efa9f4869d7ad256031983a773580dc398fb7ce25e0 SHA512 2168254a71cf52ef406e5edf4653b9c8ae05392d4ad3c2e5e8e9f8db56152d968a77d14226acdf7d962f66d460c40add335615442f6f176d697c071f9cb137f5 diff --git a/dev-python/lazy-object-proxy/files/lazy-object-proxy-1.10.0-pure-tests.patch b/dev-python/lazy-object-proxy/files/lazy-object-proxy-1.10.0-pure-tests.patch new file mode 100644 index 000000000000..c7806c68bb7a --- /dev/null +++ b/dev-python/lazy-object-proxy/files/lazy-object-proxy-1.10.0-pure-tests.patch @@ -0,0 +1,29 @@ +From 25decee2bd5a68d290dd3349aa9a72ce41b398b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 15 Dec 2023 17:45:42 +0100 +Subject: [PATCH] Support SETUPPY_FORCE_PURE in tests + +Support testing without the C extension if SETUPPY_FORCE_PURE is set. +This makes the test suite behavior consistent with setup.py behavior. +--- + tests/conftest.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 11d0379..2ba3209 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -1,3 +1,4 @@ ++import os + import sys + + import pytest +@@ -19,7 +20,7 @@ class FakeModule: + try: + from lazy_object_proxy.cext import Proxy + except ImportError: +- if PYPY: ++ if PYPY or os.environ.get('SETUPPY_FORCE_PURE'): + pytest.skip(reason='C Extension not available.') + else: + raise diff --git a/dev-python/lazy-object-proxy/lazy-object-proxy-1.10.0.ebuild b/dev-python/lazy-object-proxy/lazy-object-proxy-1.10.0.ebuild new file mode 100644 index 000000000000..049fdedf879d --- /dev/null +++ b/dev-python/lazy-object-proxy/lazy-object-proxy-1.10.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{10..12} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="A fast and thorough lazy object proxy" +HOMEPAGE=" + https://github.com/ionelmc/python-lazy-object-proxy/ + https://pypi.org/project/lazy-object-proxy/ + https://python-lazy-object-proxy.readthedocs.io/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="+native-extensions" + +BDEPEND=" + >=dev-python/setuptools-scm-8[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/ionelmc/python-lazy-object-proxy/pull/79 + "${FILESDIR}/${P}-pure-tests.patch" +) + +python_prepare_all() { + # No need to benchmark + sed \ + -e '/benchmark/s:test_:_&:g' \ + -e '/pytest.mark.benchmark/d' \ + -i tests/test_lazy_object_proxy.py || die + + distutils-r1_python_prepare_all + + if use native-extensions; then + unset SETUPPY_FORCE_PURE + else + export SETUPPY_FORCE_PURE=1 + fi +} |