summaryrefslogtreecommitdiff
path: root/dev-python/openpyxl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-29 00:07:15 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-29 00:07:15 +0100
commit5c4786a868bad6e3f46aecf32ad6c6dc5de98408 (patch)
tree1a1792815761a5b6f645c8d55b6b698e102dca48 /dev-python/openpyxl
parent3c1648a0749c1d66b300d857e6b417c1162890da (diff)
gentoo auto-resync : 29:05:2024 - 00:07:15
Diffstat (limited to 'dev-python/openpyxl')
-rw-r--r--dev-python/openpyxl/Manifest3
-rw-r--r--dev-python/openpyxl/files/openpyxl-3.1.2-pytest-8.patch118
-rw-r--r--dev-python/openpyxl/openpyxl-3.1.2.ebuild16
3 files changed, 134 insertions, 3 deletions
diff --git a/dev-python/openpyxl/Manifest b/dev-python/openpyxl/Manifest
index fe38df007eee..30a6e67d4807 100644
--- a/dev-python/openpyxl/Manifest
+++ b/dev-python/openpyxl/Manifest
@@ -1,3 +1,4 @@
+AUX openpyxl-3.1.2-pytest-8.patch 3319 BLAKE2B dba24fc7ef1164141ac34fb4000936cb8355ff69238a91cada39df2d5018888ff8d1a78f22babd72dbba7162e38d2bdb3e30b36064abb1bd3666b7fbef905ecd SHA512 bb9ca4910743eb66870f4e9d8ff1ee18e54d042a4a638b2d49dd2677b256caa19f454c66b2dfe3601adff132159ae4e998363814117dba2b0cf8e0b33a966a44
DIST openpyxl-3.1.2.tar.bz2 2733302 BLAKE2B 7030c698c2dfa3c3f27f23485e33cc9f4ffc0c473e590785ebfa03a958f7c1deab98503890b7350f32cbb4607b3fbf543b35299c0f8abfbfcc779e96ddda9ee1 SHA512 307d82dcf839c60be606c01f862701f69017573894c7fd26e35ec3edead2ea2a126aecca61b0c7f6727ff834dd6bed844095b9a56f2b510689ab071926a7a742
-EBUILD openpyxl-3.1.2.ebuild 1339 BLAKE2B e8282ac3a4a2a48d36fe838a885f18be285c9d220b2be5afb81934ffc6cb2c4b4d530ce4b3c8fb21b9a0803f6cdbdfd17e68064d1dc1b8238cd411cb84d20f6b SHA512 3cb4f0fb6ff3fa28a76f453c37ba688bb85bbba74a117ba443eece7e632170adfc85f40e00ad0c710cc5d1394709c90b54031791274a932c1b6e1fa0b3e5daf9
+EBUILD openpyxl-3.1.2.ebuild 1702 BLAKE2B eaad07d111bcf7b16604d2b5fe7cfff9fb410c5adcf8879c95db33842e4ae32d25f55b3fa308a88d3047d0047e4ae4c303ad5b84538c7ab7579295f27c4d3e9c SHA512 a032a1ac383d01c3acd246267348c3b0d6784f66a5b127f271459e71702a065f459e6d35a9e7383af15c1741357e0a027d771e4952690747e5582ad6b8f89c31
MISC metadata.xml 595 BLAKE2B c843c395f1b6a40fea607fa7f851af887fce236ad6fc5b6b77eea0b208954a3340f49ab66a5503f6951346718ecfaf5d43f1a0bbee9b86f4b11c29b1e4cb6394 SHA512 a0cc42713e9c67438050b44c810f17ab4946f8a1eece0159e71d4abe749047dd44ff430605bf5c34af12de2abe4937955c7aade0c5af708ed7f6b816684c8763
diff --git a/dev-python/openpyxl/files/openpyxl-3.1.2-pytest-8.patch b/dev-python/openpyxl/files/openpyxl-3.1.2-pytest-8.patch
new file mode 100644
index 000000000000..72ed1fab7638
--- /dev/null
+++ b/dev-python/openpyxl/files/openpyxl-3.1.2-pytest-8.patch
@@ -0,0 +1,118 @@
+From 517ce7d21194da275f8083fa2fd7de6977dc7e95 Mon Sep 17 00:00:00 2001
+From: Charlie Clark <charlie.clark@clark-consulting.eu>
+Date: Mon, 11 Mar 2024 13:38:08 +0100
+Subject: [PATCH] Looks like pytest has dropped support for unittest setup
+ methods so switched to fixture.
+
+--HG--
+branch : 3.1
+---
+ openpyxl/drawing/tests/test_drawing.py | 46 ++++++++++++++------------
+ 1 file changed, 24 insertions(+), 22 deletions(-)
+
+diff --git a/openpyxl/drawing/tests/test_drawing.py b/openpyxl/drawing/tests/test_drawing.py
+index c4c0712dd..befd2267c 100644
+--- a/openpyxl/drawing/tests/test_drawing.py
++++ b/openpyxl/drawing/tests/test_drawing.py
+@@ -1,20 +1,20 @@
+ # Copyright (c) 2010-2024 openpyxl
+
+ import pytest
+-
+ from openpyxl.xml.functions import tostring
+-
+ from openpyxl.tests.helper import compare_xml
+
++@pytest.fixture
++def Drawing():
++ from ..drawing import Drawing
++ return Drawing
++
+
+ class TestDrawing(object):
+
+- def setup(self):
+- from ..drawing import Drawing
+- self.drawing = Drawing()
+
+- def test_ctor(self):
+- d = self.drawing
++ def test_ctor(self, Drawing):
++ d = Drawing()
+ assert d.coordinates == ((1, 2), (16, 8))
+ assert d.width == 21
+ assert d.height == 192
+@@ -26,34 +26,34 @@ class TestDrawing(object):
+ assert d.description == ""
+ assert d.name == ""
+
+- def test_width(self):
+- d = self.drawing
++ def test_width(self, Drawing):
++ d = Drawing()
+ d.width = 100
+ d.height = 50
+ assert d.width == 100
+
+- def test_proportional_width(self):
+- d = self.drawing
++ def test_proportional_width(self, Drawing):
++ d = Drawing()
+ d.resize_proportional = True
+ d.width = 100
+ d.height = 50
+ assert (d.width, d.height) == (5, 50)
+
+- def test_height(self):
+- d = self.drawing
++ def test_height(self, Drawing):
++ d = Drawing()
+ d.height = 50
+ d.width = 100
+ assert d.height == 50
+
+- def test_proportional_height(self):
+- d = self.drawing
++ def test_proportional_height(self, Drawing):
++ d = Drawing()
+ d.resize_proportional = True
+ d.height = 50
+ d.width = 100
+ assert (d.width, d.height) == (100, 1000)
+
+- def test_set_dimension(self):
+- d = self.drawing
++ def test_set_dimension(self, Drawing):
++ d = Drawing()
+ d.resize_proportional = True
+ d.set_dimension(100, 50)
+ assert d.width == 6
+@@ -65,8 +65,9 @@ class TestDrawing(object):
+
+
+ @pytest.mark.pil_required
+- def test_absolute_anchor(self):
+- node = self.drawing.anchor
++ def test_absolute_anchor(self, Drawing):
++ drawing = Drawing()
++ node = drawing.anchor
+ xml = tostring(node.to_tree())
+ expected = """
+ <absoluteAnchor>
+@@ -80,9 +81,10 @@ class TestDrawing(object):
+
+
+ @pytest.mark.pil_required
+- def test_onecell_anchor(self):
+- self.drawing.anchortype = "oneCell"
+- node = self.drawing.anchor
++ def test_onecell_anchor(self, Drawing):
++ drawing = Drawing()
++ drawing.anchortype = "oneCell"
++ node = drawing.anchor
+ xml = tostring(node.to_tree())
+ expected = """
+ <oneCellAnchor>
+--
+GitLab
+
diff --git a/dev-python/openpyxl/openpyxl-3.1.2.ebuild b/dev-python/openpyxl/openpyxl-3.1.2.ebuild
index bc945c3d872d..20b72e6cf240 100644
--- a/dev-python/openpyxl/openpyxl-3.1.2.ebuild
+++ b/dev-python/openpyxl/openpyxl-3.1.2.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1
@@ -22,7 +22,7 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
RDEPEND="
- dev-python/et_xmlfile[${PYTHON_USEDEP}]
+ dev-python/et-xmlfile[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
@@ -35,9 +35,21 @@ distutils_enable_sphinx doc \
dev-python/sphinx-rtd-theme
distutils_enable_tests pytest
+PATCHES=(
+ # https://foss.heptapod.net/openpyxl/openpyxl/-/commit/517ce7d21194da275f8083fa2fd7de6977dc7e95
+ "${FILESDIR}/${P}-pytest-8.patch"
+)
+
python_test() {
local EPYTEST_DESELECT=()
+ if has_version ">=dev-python/numpy-2[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ # https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2187
+ openpyxl/compat/tests/test_compat.py::test_numpy_tostring
+ )
+ fi
+
case ${EPYTHON} in
python3.12)
EPYTEST_DESELECT+=(