mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
dev-python/lazy-object-proxy: Sync with Gentoo
It's from Gentoo commit f578a6dea74c25e76856fb75cf9568b1fd47edb5.
This commit is contained in:
parent
c4f57fc0f6
commit
6731ab30ce
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user