summaryrefslogtreecommitdiff
path: root/dev-python/openpyxl
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-05-28 19:07:39 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-05-28 19:07:39 +0000
commit85c00403852442ad1cf4cbf4ce30fa71f0772f80 (patch)
tree2eeece37927e20f536076e28b31f6d420cea0d71 /dev-python/openpyxl
parentbeadf27eb8a9d1fafbad5cc36170ca46d54b5dfe (diff)
downloadbaldeagleos-repo-85c00403852442ad1cf4cbf4ce30fa71f0772f80.tar.gz
baldeagleos-repo-85c00403852442ad1cf4cbf4ce30fa71f0772f80.tar.xz
baldeagleos-repo-85c00403852442ad1cf4cbf4ce30fa71f0772f80.zip
Adding metadata
Diffstat (limited to 'dev-python/openpyxl')
-rw-r--r--dev-python/openpyxl/files/openpyxl-3.1.2-pytest-8.patch118
-rw-r--r--dev-python/openpyxl/openpyxl-3.1.2.ebuild14
2 files changed, 131 insertions, 1 deletions
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 9b4b64a2cdbe..cbd7ca5a7270 100644
--- a/dev-python/openpyxl/openpyxl-3.1.2.ebuild
+++ b/dev-python/openpyxl/openpyxl-3.1.2.ebuild
@@ -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+=(