Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/vpython/, dev-python/vpython/files/
Date: Sun, 28 Nov 2021 15:09:36
Message-Id: 1638112169.e57537683c4ebea75fe11532aaf7a833e0c048f2.andrewammerlaan@gentoo
1 commit: e57537683c4ebea75fe11532aaf7a833e0c048f2
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 28 15:08:53 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 28 15:09:29 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5753768
7
8 dev-python/vpython: add version 7.6.2, enable py3.10
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
12
13 dev-python/vpython/Manifest | 1 +
14 .../vpython-7.6.2-fix-python310-detection.patch | 56 ++++++++++++++++++++++
15 dev-python/vpython/vpython-7.6.2.ebuild | 38 +++++++++++++++
16 3 files changed, 95 insertions(+)
17
18 diff --git a/dev-python/vpython/Manifest b/dev-python/vpython/Manifest
19 index 88c99e2919e9..f0a2252d7ebd 100644
20 --- a/dev-python/vpython/Manifest
21 +++ b/dev-python/vpython/Manifest
22 @@ -1 +1,2 @@
23 DIST vpython-7.6.1.tar.gz 3552831 BLAKE2B 78281ebbdae2bf09d139569cd344f32aa77aad59ce988a72c57b9984774bc376348c6e69c9119822fe1fbd5dbe6cecf81f17da3977b257c64321e4d4f2deb755 SHA512 8a06bf41865a6bb61c6616c853889b24128f32a9ce1eb8cd9ff861e4995f700ea24e7ffc04fd1edf9cd823a1a592083202abecb1373d5f544facc8646f0cf30b
24 +DIST vpython-7.6.2.tar.gz 4461606 BLAKE2B 67e59d5ac8e061ffa62433bcc1c3285cf659482e298b706d2b59ef8160c154c42efa8677fce19856a88024af06fb71882ff280ba2e1312a18da272168a4eb1a9 SHA512 fb8f0e9219950cab6d800a44a7fa473bd39e67895170b5cd7636a78cefd83f740d5b4da245b3f252402bfae6e576948b5831d230bf365ac7141ba6bf5f1ef6d6
25
26 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
27 new file mode 100644
28 index 000000000000..5cf5b2fe000a
29 --- /dev/null
30 +++ b/dev-python/vpython/files/vpython-7.6.2-fix-python310-detection.patch
31 @@ -0,0 +1,56 @@
32 +From 426eeae74eb67934bf7ddcffc07677d93a7ea191 Mon Sep 17 00:00:00 2001
33 +From: Mike <Axe319@×××××.com>
34 +Date: Fri, 8 Oct 2021 17:22:52 -0400
35 +Subject: [PATCH 1/2] Fixed version check to encompass Python 3.10
36 +
37 +---
38 + vpython/__init__.py | 12 ++++++------
39 + 1 file changed, 6 insertions(+), 6 deletions(-)
40 +
41 +diff --git a/vpython/__init__.py b/vpython/__init__.py
42 +index 3fc6ce5..c09f697 100644
43 +--- a/vpython/__init__.py
44 ++++ b/vpython/__init__.py
45 +@@ -10,14 +10,14 @@
46 + # both of those.
47 +
48 + from ._notebook_helpers import _isnotebook, __is_spyder
49 +-import platform
50 +-__p = platform.python_version()
51 ++import sys
52 ++__v = sys.version_info
53 +
54 +-# Delete platform now that we are done with it
55 +-del platform
56 ++# Delete sys now that we are done with it
57 ++del sys
58 +
59 +-__ispython3 = (__p[0] == '3')
60 +-__require_notebook = (not __ispython3) or (__p[2] < '5') # Python 2.7 or 3.4 require Jupyter notebook
61 ++__ispython3 = (__v.major == 3)
62 ++__require_notebook = (not __ispython3) or (__v.minor < 5) # Python 2.7 or 3.4 require Jupyter notebook
63 +
64 + if __require_notebook and (not _isnotebook):
65 + s = "The non-notebook version of vpython requires Python 3.5 or later."
66 +
67 +From 405062dcca5a9a8656b99afb52cd13ce885f8bd1 Mon Sep 17 00:00:00 2001
68 +From: Mike <Axe319@×××××.com>
69 +Date: Mon, 11 Oct 2021 18:16:50 -0400
70 +Subject: [PATCH 2/2] Added username to contributors.md
71 +
72 +---
73 + CONTRIBUTORS.md | 1 +
74 + 1 file changed, 1 insertion(+)
75 +
76 +diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
77 +index 1f627bd..d608966 100644
78 +--- a/CONTRIBUTORS.md
79 ++++ b/CONTRIBUTORS.md
80 +@@ -30,6 +30,7 @@ We are certain the list is incomplete; please let one of us know by opening an [
81 + + Kyle Dunn ([@kdunn926](https://github.com/kdunn926))
82 + + Brian Su ([@brianbbsu](https://github.com/brianbbsu))
83 + + [@0dminnimda](https://github.com/0dminnimda)
84 +++ Mike Miller ([@Axe319](https://github.com/axe319))
85 +
86 + ## Full timeline of vpython development
87 +
88
89 diff --git a/dev-python/vpython/vpython-7.6.2.ebuild b/dev-python/vpython/vpython-7.6.2.ebuild
90 new file mode 100644
91 index 000000000000..cbf767586bd9
92 --- /dev/null
93 +++ b/dev-python/vpython/vpython-7.6.2.ebuild
94 @@ -0,0 +1,38 @@
95 +# Copyright 1999-2021 Gentoo Authors
96 +# Distributed under the terms of the GNU General Public License v2
97 +
98 +EAPI=8
99 +
100 +PYTHON_COMPAT=( python3_{8..10} )
101 +
102 +inherit distutils-r1
103 +
104 +DESCRIPTION="VPython for Jupyter notebook"
105 +HOMEPAGE="https://www.vpython.org/ https://pypi.org/project/vpython/"
106 +SRC_URI="https://github.com/${PN}/${PN}-jupyter/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
107 +S="${WORKDIR}/${PN}-jupyter-${PV}"
108 +
109 +RDEPEND="
110 + >=dev-python/autobahn-18.8.2[${PYTHON_USEDEP}]
111 + dev-python/ipykernel[${PYTHON_USEDEP}]
112 + dev-python/jupyter[${PYTHON_USEDEP}]
113 + dev-python/jupyter-server-proxy[${PYTHON_USEDEP}]
114 + dev-python/numpy[${PYTHON_USEDEP}]
115 +"
116 +BDEPEND="
117 + dev-python/cython[${PYTHON_USEDEP}]
118 + dev-python/versioneer[${PYTHON_USEDEP}]
119 +"
120 +DEPEND="
121 + ${RDEPEND}
122 + ${BDEPEND}
123 +"
124 +
125 +LICENSE="BSD-2"
126 +SLOT="0"
127 +KEYWORDS="~amd64"
128 +
129 +RESTRICT="test"
130 +PATCHES="${FILESDIR}/${P}-fix-python310-detection.patch"
131 +
132 +distutils_enable_tests pytest