summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-11-28 16:08:53 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-11-28 16:09:29 +0100
commite57537683c4ebea75fe11532aaf7a833e0c048f2 (patch)
tree3b71ab06ab83324cea2bc4f7e0ddbf73780097b2 /dev-python
parentdev-python/jupyter-server-proxy: new dep of vpython (diff)
downloadgentoo-e57537683c4ebea75fe11532aaf7a833e0c048f2.tar.gz
gentoo-e57537683c4ebea75fe11532aaf7a833e0c048f2.tar.bz2
gentoo-e57537683c4ebea75fe11532aaf7a833e0c048f2.zip
dev-python/vpython: add version 7.6.2, enable py3.10
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/vpython/Manifest1
-rw-r--r--dev-python/vpython/files/vpython-7.6.2-fix-python310-detection.patch56
-rw-r--r--dev-python/vpython/vpython-7.6.2.ebuild38
3 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/vpython/Manifest b/dev-python/vpython/Manifest
index 88c99e2919e9..f0a2252d7ebd 100644
--- a/dev-python/vpython/Manifest
+++ b/dev-python/vpython/Manifest
@@ -1 +1,2 @@
DIST vpython-7.6.1.tar.gz 3552831 BLAKE2B 78281ebbdae2bf09d139569cd344f32aa77aad59ce988a72c57b9984774bc376348c6e69c9119822fe1fbd5dbe6cecf81f17da3977b257c64321e4d4f2deb755 SHA512 8a06bf41865a6bb61c6616c853889b24128f32a9ce1eb8cd9ff861e4995f700ea24e7ffc04fd1edf9cd823a1a592083202abecb1373d5f544facc8646f0cf30b
+DIST vpython-7.6.2.tar.gz 4461606 BLAKE2B 67e59d5ac8e061ffa62433bcc1c3285cf659482e298b706d2b59ef8160c154c42efa8677fce19856a88024af06fb71882ff280ba2e1312a18da272168a4eb1a9 SHA512 fb8f0e9219950cab6d800a44a7fa473bd39e67895170b5cd7636a78cefd83f740d5b4da245b3f252402bfae6e576948b5831d230bf365ac7141ba6bf5f1ef6d6
diff --git a/dev-python/vpython/files/vpython-7.6.2-fix-python310-detection.patch b/dev-python/vpython/files/vpython-7.6.2-fix-python310-detection.patch
new file mode 100644
index 000000000000..5cf5b2fe000a
--- /dev/null
+++ b/dev-python/vpython/files/vpython-7.6.2-fix-python310-detection.patch
@@ -0,0 +1,56 @@
+From 426eeae74eb67934bf7ddcffc07677d93a7ea191 Mon Sep 17 00:00:00 2001
+From: Mike <Axe319@gmail.com>
+Date: Fri, 8 Oct 2021 17:22:52 -0400
+Subject: [PATCH 1/2] Fixed version check to encompass Python 3.10
+
+---
+ vpython/__init__.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/vpython/__init__.py b/vpython/__init__.py
+index 3fc6ce5..c09f697 100644
+--- a/vpython/__init__.py
++++ b/vpython/__init__.py
+@@ -10,14 +10,14 @@
+ # both of those.
+
+ from ._notebook_helpers import _isnotebook, __is_spyder
+-import platform
+-__p = platform.python_version()
++import sys
++__v = sys.version_info
+
+-# Delete platform now that we are done with it
+-del platform
++# Delete sys now that we are done with it
++del sys
+
+-__ispython3 = (__p[0] == '3')
+-__require_notebook = (not __ispython3) or (__p[2] < '5') # Python 2.7 or 3.4 require Jupyter notebook
++__ispython3 = (__v.major == 3)
++__require_notebook = (not __ispython3) or (__v.minor < 5) # Python 2.7 or 3.4 require Jupyter notebook
+
+ if __require_notebook and (not _isnotebook):
+ s = "The non-notebook version of vpython requires Python 3.5 or later."
+
+From 405062dcca5a9a8656b99afb52cd13ce885f8bd1 Mon Sep 17 00:00:00 2001
+From: Mike <Axe319@gmail.com>
+Date: Mon, 11 Oct 2021 18:16:50 -0400
+Subject: [PATCH 2/2] Added username to contributors.md
+
+---
+ CONTRIBUTORS.md | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
+index 1f627bd..d608966 100644
+--- a/CONTRIBUTORS.md
++++ b/CONTRIBUTORS.md
+@@ -30,6 +30,7 @@ We are certain the list is incomplete; please let one of us know by opening an [
+ + Kyle Dunn ([@kdunn926](https://github.com/kdunn926))
+ + Brian Su ([@brianbbsu](https://github.com/brianbbsu))
+ + [@0dminnimda](https://github.com/0dminnimda)
+++ Mike Miller ([@Axe319](https://github.com/axe319))
+
+ ## Full timeline of vpython development
+
diff --git a/dev-python/vpython/vpython-7.6.2.ebuild b/dev-python/vpython/vpython-7.6.2.ebuild
new file mode 100644
index 000000000000..cbf767586bd9
--- /dev/null
+++ b/dev-python/vpython/vpython-7.6.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="VPython for Jupyter notebook"
+HOMEPAGE="https://www.vpython.org/ https://pypi.org/project/vpython/"
+SRC_URI="https://github.com/${PN}/${PN}-jupyter/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-jupyter-${PV}"
+
+RDEPEND="
+ >=dev-python/autobahn-18.8.2[${PYTHON_USEDEP}]
+ dev-python/ipykernel[${PYTHON_USEDEP}]
+ dev-python/jupyter[${PYTHON_USEDEP}]
+ dev-python/jupyter-server-proxy[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/versioneer[${PYTHON_USEDEP}]
+"
+DEPEND="
+ ${RDEPEND}
+ ${BDEPEND}
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="test"
+PATCHES="${FILESDIR}/${P}-fix-python310-detection.patch"
+
+distutils_enable_tests pytest