summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-10-12 23:51:32 -0400
committerSam James <sam@gentoo.org>2023-10-31 00:05:38 +0000
commite6ee46bc4c5843053bbf29eb638a49323d39f8a3 (patch)
tree6ccb8566d674d3948f42d9db1fc3ef737dedef47
parentdev-lang/R: eliminate pointless use of mirror:// (diff)
downloadgentoo-e6ee46bc4c5843053bbf29eb638a49323d39f8a3.tar.gz
gentoo-e6ee46bc4c5843053bbf29eb638a49323d39f8a3.tar.bz2
gentoo-e6ee46bc4c5843053bbf29eb638a49323d39f8a3.zip
dev-python/matplotlib-inline: drop undesirable dependency on matplotlib
This python module is an ipython extension that exists solely to implement the `%matplotlib` magic inside of the ipython shell and directly interacts with the ipython extension API to do it. Despite this, it does NOT have an ebuild dependency on ipython itself, even though you cannot `import matplotlib_inline.backend_inline` without ipython installed. It does have a dependency on matplotlib, which is another import-time import. However, the setup.cfg intentionally avoids depending on either one. This is because both are actually internal implementation details of *ipython*. In turn, ipython does not wish to have a mandatory runtime dependency on matplotlib, all it wishes to do is have code prepared and ready to import matplotlib, should a user execute `%matplotlib` in the interactive console. In this case, it is assumed that the user has also installed matplotlib. Respect the upstream dependency. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-python/matplotlib-inline/matplotlib-inline-0.1.6-r1.ebuild32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/matplotlib-inline/matplotlib-inline-0.1.6-r1.ebuild b/dev-python/matplotlib-inline/matplotlib-inline-0.1.6-r1.ebuild
new file mode 100644
index 000000000000..0803c515b454
--- /dev/null
+++ b/dev-python/matplotlib-inline/matplotlib-inline-0.1.6-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Inline Matplotlib backend for Jupyter"
+HOMEPAGE="https://github.com/ipython/matplotlib-inline/"
+SRC_URI="
+ https://github.com/ipython/matplotlib-inline/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
+
+# Although in theory we could depend on matplotlib, upstream does not.
+# This is because the sole purpose of the package is to be loaded by
+# ipython (also not a dependency!) as a response to interactive use of
+# the "%matplotlib" magic.
+#
+# In order to be seamless and straightforward, this backend is always
+# installed and just requires users using matplotlib, to install
+# matplotlib before importing and using it.
+RDEPEND="
+ dev-python/traitlets[${PYTHON_USEDEP}]
+"