public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lazy-object-proxy/, dev-python/lazy-object-proxy/files/
@ 2023-12-15 16:59 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2023-12-15 16:59 UTC (permalink / raw
  To: gentoo-commits

commit:     720627c5a2848c60fbbf9518cc4a3babf4554b73
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 16:34:22 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 16:59:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=720627c5

dev-python/lazy-object-proxy: Bump to 1.10.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lazy-object-proxy/Manifest              |  1 +
 .../lazy-object-proxy-1.10.0-pure-tests.patch      | 29 +++++++++++++
 .../lazy-object-proxy-1.10.0.ebuild                | 50 ++++++++++++++++++++++
 3 files changed, 80 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-15 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 16:59 [gentoo-commits] repo/gentoo:master commit in: dev-python/lazy-object-proxy/, dev-python/lazy-object-proxy/files/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox