diff options
Diffstat (limited to 'dev-python/tikzplotlib')
-rw-r--r-- | dev-python/tikzplotlib/Manifest | 5 | ||||
-rw-r--r-- | dev-python/tikzplotlib/files/tikzplotlib-0.10.1-matplotlib-3.6.0.patch | 48 | ||||
-rw-r--r-- | dev-python/tikzplotlib/tikzplotlib-0.10.1-r1.ebuild (renamed from dev-python/tikzplotlib/tikzplotlib-0.10.1.ebuild) | 19 |
3 files changed, 65 insertions, 7 deletions
diff --git a/dev-python/tikzplotlib/Manifest b/dev-python/tikzplotlib/Manifest index 43d5cd2f3af6..a89a6a5e2e10 100644 --- a/dev-python/tikzplotlib/Manifest +++ b/dev-python/tikzplotlib/Manifest @@ -1,3 +1,4 @@ -DIST tikzplotlib-0.10.1.tar.gz 98265 BLAKE2B 7664e702afb38580af78f2b0887000215a5a0c2ef57e4f9ca5d1100bcba257365b89aee805e800e3a9b5a992487c1ee9733088dadc53941405c0055336478130 SHA512 13a750d9929db1d4ce4608a296523be55878c702846b0b339c6c002cbdf4e8f7b1ffea84db612d8932a379fafce9b4fe6ab6ce4325bf780f211cc0b885a15818 -EBUILD tikzplotlib-0.10.1.ebuild 978 BLAKE2B 7d63c6dfe5cef60b1f2cd417786ec4b8b87f0628f42e6d3b2d55fbc509b7f9e35e107d2bcb953c48e6c2c88a34e4b14de0d5df3a11dd43bcde1e9d0a6aef5e9c SHA512 5aee766047e6af868268f375ad0761de14cb4c801231b6a89a348570fe2361c6bc5d4ac243ad151aa4aa92decd9c7c2592f664ac5a71aa819b07e6e52b69d01e +AUX tikzplotlib-0.10.1-matplotlib-3.6.0.patch 1622 BLAKE2B bd7d5fc97835f89782bbf1dc4071dffdc6f633f5852a8ab6ed26f6e6b8ccdca1600259630e749278d4252d6c9fbe595147dde500d411d0d76976d039e13fcb65 SHA512 5405986792fc808561379aad09eb7d9241e456d5e2bd3dedf682035069eb290d57df42429f5330465c0ecebf1591a840ae7759ceb5ec21f3562be404d5e9218b +DIST tikzplotlib-0.10.1.gh.tar.gz 98265 BLAKE2B 7664e702afb38580af78f2b0887000215a5a0c2ef57e4f9ca5d1100bcba257365b89aee805e800e3a9b5a992487c1ee9733088dadc53941405c0055336478130 SHA512 13a750d9929db1d4ce4608a296523be55878c702846b0b339c6c002cbdf4e8f7b1ffea84db612d8932a379fafce9b4fe6ab6ce4325bf780f211cc0b885a15818 +EBUILD tikzplotlib-0.10.1-r1.ebuild 1189 BLAKE2B 35ea9a5aa827d4a18e32734b2344a738be4181fb4f149cdae8510d2c1329cf4b7e22c801ff242ab0468a6dada462da27b55160b743d59921e32d7fc73f1bb75d SHA512 7b32901f7838d091088079eaffd304f19880a4a500a8473762b3087b1ba5b56c4c5aeb3059ea3606a2e7a705a06742c96fe3a1698308197e297f4639ad5f0e04 MISC metadata.xml 854 BLAKE2B d3cd2be01b5f729857c8957a875caa3f42574634daa75dd9249fdc4497d63bb9b0a7501ed06429b4a3d3a0813406a88403c70819581be92948aa52f95a148352 SHA512 609fa041d9a99edd80118743464f39ee4ea00c3de665e6c4ce72b1748f83f9e0828439af61b2d090207e04776a312e65c653036c5309e53cd7823ca581116c07 diff --git a/dev-python/tikzplotlib/files/tikzplotlib-0.10.1-matplotlib-3.6.0.patch b/dev-python/tikzplotlib/files/tikzplotlib-0.10.1-matplotlib-3.6.0.patch new file mode 100644 index 000000000000..2c3a0e506cc6 --- /dev/null +++ b/dev-python/tikzplotlib/files/tikzplotlib-0.10.1-matplotlib-3.6.0.patch @@ -0,0 +1,48 @@ +https://github.com/texworld/tikzplotlib/issues/567 +https://github.com/texworld/tikzplotlib/pull/558 + +From f9988eb6aa7cc7d55c0bb528c53e7a8408308939 Mon Sep 17 00:00:00 2001 +From: Paul Kim <44695374+thekpaul@users.noreply.github.com> +Date: Mon, 3 Oct 2022 01:15:21 +0900 +Subject: [PATCH 1/2] Legend Compatibility Issue in texworld#557 + +. + +. +--- a/src/tikzplotlib/_legend.py ++++ b/src/tikzplotlib/_legend.py +@@ -78,7 +78,7 @@ def draw_legend(data, obj): + if alignment: + data["current axes"].axis_options.append(f"legend cell align={{{alignment}}}") + +- if obj._ncol != 1: ++ if obj._ncols != 1: + data["current axes"].axis_options.append(f"legend columns={obj._ncol}") + + # Write styles to data + +From 61f7ea2fb2633f1c0de48f8da1f90a5f9ba078c1 Mon Sep 17 00:00:00 2001 +From: Paul Kim <44695374+thekpaul@users.noreply.github.com> +Date: Wed, 5 Oct 2022 11:30:48 +0900 +Subject: [PATCH 2/2] Backwards Compat for `ncol` + +Co-authored-by: st-- <st--@users.noreply.github.com> +--- a/src/tikzplotlib/_legend.py ++++ b/src/tikzplotlib/_legend.py +@@ -78,8 +78,13 @@ def draw_legend(data, obj): + if alignment: + data["current axes"].axis_options.append(f"legend cell align={{{alignment}}}") + +- if obj._ncols != 1: +- data["current axes"].axis_options.append(f"legend columns={obj._ncol}") ++ try: ++ ncols = obj._ncols ++ except AttributeError: ++ # backwards-compatibility with matplotlib < 3.6.0 ++ ncols = obj._ncol ++ if ncols != 1: ++ data["current axes"].axis_options.append(f"legend columns={ncols}") + + # Write styles to data + if legend_style: + diff --git a/dev-python/tikzplotlib/tikzplotlib-0.10.1.ebuild b/dev-python/tikzplotlib/tikzplotlib-0.10.1-r1.ebuild index 67419d0063ef..7b21d67ed209 100644 --- a/dev-python/tikzplotlib/tikzplotlib-0.10.1.ebuild +++ b/dev-python/tikzplotlib/tikzplotlib-0.10.1-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( python3_{9..10} ) +PYTHON_COMPAT=( python3_{9..11} ) inherit distutils-r1 virtualx @@ -13,26 +13,31 @@ HOMEPAGE=" https://github.com/texworld/tikzplotlib/ https://pypi.org/project/tikzplotlib/ " -SRC_URI="https://github.com/texworld/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/texworld/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~x86" +# https://github.com/texworld/tikzplotlib/issues/567 for mpl-3.6.0 dep RDEPEND=" app-text/texlive[extra] - dev-python/matplotlib[latex,${PYTHON_USEDEP}] + <dev-python/matplotlib-3.6.0[latex,${PYTHON_USEDEP}] dev-python/numpy[${PYTHON_USEDEP}] dev-python/pillow[${PYTHON_USEDEP}] dev-python/webcolors[${PYTHON_USEDEP}] " - BDEPEND=" test? ( dev-python/pandas[${PYTHON_USEDEP}] dev-python/pytest-codeblocks[${PYTHON_USEDEP}] dev-python/scipy[${PYTHON_USEDEP}] - )" + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.10.1-matplotlib-3.6.0.patch +) distutils_enable_tests pytest distutils_enable_sphinx doc dev-python/mock @@ -41,3 +46,7 @@ src_test() { local -x MPLBACKEND=Agg virtx distutils-r1_src_test } + +python_test() { + epytest || die "Tests failed with ${EPYTHON}" +} |