summaryrefslogtreecommitdiff
path: root/dev-python/jupyter_console
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/jupyter_console
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/jupyter_console')
-rw-r--r--dev-python/jupyter_console/Manifest2
-rw-r--r--dev-python/jupyter_console/files/jupyter_console-6.1.0-py39.patch51
-rw-r--r--dev-python/jupyter_console/jupyter_console-6.0.0.ebuild53
-rw-r--r--dev-python/jupyter_console/jupyter_console-6.1.0.ebuild42
-rw-r--r--dev-python/jupyter_console/metadata.xml21
5 files changed, 169 insertions, 0 deletions
diff --git a/dev-python/jupyter_console/Manifest b/dev-python/jupyter_console/Manifest
new file mode 100644
index 000000000000..2e173379d35b
--- /dev/null
+++ b/dev-python/jupyter_console/Manifest
@@ -0,0 +1,2 @@
+DIST jupyter_console-6.0.0.tar.gz 27780 BLAKE2B da2b58461caa987bea0b323cedbc79ff24f31cb928602b8ae6dce1ed615008a8227d7a1bab47364e6d182cfd3bd6f548e355430efc505e7183a391ef26c08375 SHA512 27b333f439733c33062d3baa8b49ff673b10e22cb8c28c688ba604799838e899f93372bd2eaf4a94c97260d6dec043d6aef4421388d77e625b1ec43a3dedfa3f
+DIST jupyter_console-6.1.0.tar.gz 28468 BLAKE2B 08ef158de6a0eb8fe741dac00b74e11f7e577b5097f54aa16c47ae9e39607231e19a1fcd0a96cbae41d41fad891fefdb532d0f66bc03aa66ff99a8d3ff3cb28c SHA512 abb5457a90d109457e91071cd8b592a14bec7ead75fd667d656f9180a457e39bf470877b2e17c81ff512d1cc69b62a8f700996492f6164eb05a1581db82abbf7
diff --git a/dev-python/jupyter_console/files/jupyter_console-6.1.0-py39.patch b/dev-python/jupyter_console/files/jupyter_console-6.1.0-py39.patch
new file mode 100644
index 000000000000..92d3532649e9
--- /dev/null
+++ b/dev-python/jupyter_console/files/jupyter_console-6.1.0-py39.patch
@@ -0,0 +1,51 @@
+From 3b648aab9ce731beab1f02d714a97905ab0e42e1 Mon Sep 17 00:00:00 2001
+From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Thu, 2 Jan 2020 18:30:41 +0530
+Subject: [PATCH] Fix deprecation warning in base64
+
+---
+ jupyter_console/ptshell.py | 6 +++---
+ jupyter_console/tests/test_image_handler.py | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/jupyter_console/ptshell.py b/jupyter_console/ptshell.py
+index 84af32f..6a55fe1 100644
+--- a/jupyter_console/ptshell.py
++++ b/jupyter_console/ptshell.py
+@@ -818,12 +818,12 @@ def handle_image_PIL(self, data, mime):
+ from PIL import Image, ImageShow
+ except ImportError:
+ return False
+- raw = base64.decodestring(data[mime].encode('ascii'))
++ raw = base64.decodebytes(data[mime].encode('ascii'))
+ img = Image.open(BytesIO(raw))
+ return ImageShow.show(img)
+
+ def handle_image_stream(self, data, mime):
+- raw = base64.decodestring(data[mime].encode('ascii'))
++ raw = base64.decodebytes(data[mime].encode('ascii'))
+ imageformat = self._imagemime[mime]
+ fmt = dict(format=imageformat)
+ args = [s.format(**fmt) for s in self.stream_image_handler]
+@@ -835,7 +835,7 @@ def handle_image_stream(self, data, mime):
+ return (proc.returncode == 0)
+
+ def handle_image_tempfile(self, data, mime):
+- raw = base64.decodestring(data[mime].encode('ascii'))
++ raw = base64.decodebytes(data[mime].encode('ascii'))
+ imageformat = self._imagemime[mime]
+ filename = 'tmp.{0}'.format(imageformat)
+ with NamedFileInTemporaryDirectory(filename) as f, \
+diff --git a/jupyter_console/tests/test_image_handler.py b/jupyter_console/tests/test_image_handler.py
+index 5296635..b2a5ea9 100644
+--- a/jupyter_console/tests/test_image_handler.py
++++ b/jupyter_console/tests/test_image_handler.py
+@@ -32,7 +32,7 @@ def setUp(self):
+ self.shell = NonCommunicatingShell()
+ self.raw = b'dummy data'
+ self.mime = 'image/png'
+- self.data = {self.mime: base64.encodestring(self.raw).decode('ascii')}
++ self.data = {self.mime: base64.encodebytes(self.raw).decode('ascii')}
+
+ def test_call_pil_by_default(self):
+ pil_called_with = []
diff --git a/dev-python/jupyter_console/jupyter_console-6.0.0.ebuild b/dev-python/jupyter_console/jupyter_console-6.0.0.ebuild
new file mode 100644
index 000000000000..643134af1a3f
--- /dev/null
+++ b/dev-python/jupyter_console/jupyter_console-6.0.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit distutils-r1
+
+DESCRIPTION="A terminal-based console frontend for Jupyter kernels"
+HOMEPAGE="https://jupyter.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/ipython[${PYTHON_USEDEP}]
+ dev-python/ipykernel[${PYTHON_USEDEP}]
+ dev-python/jupyter_client[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.0[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? (
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ >=dev-python/nose-0.10.1[${PYTHON_USEDEP}]
+ )
+ "
+
+python_prepare_all() {
+ # Prevent un-needed download during build
+ if use doc; then
+ sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/conf.py || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ emake -C docs html
+ HTML_DOCS=( docs/_build/html/. )
+ fi
+}
+
+python_test() {
+ nosetests --with-coverage --cover-package=jupyter_console jupyter_console || die
+}
diff --git a/dev-python/jupyter_console/jupyter_console-6.1.0.ebuild b/dev-python/jupyter_console/jupyter_console-6.1.0.ebuild
new file mode 100644
index 000000000000..37b6ca896bc2
--- /dev/null
+++ b/dev-python/jupyter_console/jupyter_console-6.1.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit distutils-r1
+
+DESCRIPTION="A terminal-based console frontend for Jupyter kernels"
+HOMEPAGE="https://jupyter.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/ipython[${PYTHON_USEDEP}]
+ dev-python/ipykernel[${PYTHON_USEDEP}]
+ dev-python/jupyter_client[${PYTHON_USEDEP}]
+ <dev-python/prompt_toolkit-3.1.0[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ "
+# util-linux provides script(1)
+BDEPEND="
+ test? (
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ sys-apps/util-linux
+ )
+ "
+
+distutils_enable_sphinx docs
+distutils_enable_tests nose
+
+PATCHES=(
+ "${FILESDIR}"/${P}-py39.patch
+)
+
+python_test() {
+ script -eqc "nosetests -v" || die
+}
diff --git a/dev-python/jupyter_console/metadata.xml b/dev-python/jupyter_console/metadata.xml
new file mode 100644
index 000000000000..4512ddfaa63a
--- /dev/null
+++ b/dev-python/jupyter_console/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription>
+ A terminal-based console frontend for Jupyter kernels.
+ This code is based on the single-process IPython terminal.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">jupyter_console</remote-id>
+ <remote-id type="github">jupyter/jupyter_console</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>