aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorea Christian <chr@chymera.eu>2023-01-15 12:24:02 -0500
committerHorea Christian <chr@chymera.eu>2023-01-15 12:24:53 -0500
commit5857ad8b9eb2c589505e2ae90f4492af4907cf56 (patch)
treec12cfa94a069665224448655a881113d0d22ee53
parentdev-python/panel: update EAPI and PYTHON_COMPAT (diff)
downloadsci-5857ad8b9eb2c589505e2ae90f4492af4907cf56.tar.gz
sci-5857ad8b9eb2c589505e2ae90f4492af4907cf56.tar.bz2
sci-5857ad8b9eb2c589505e2ae90f4492af4907cf56.zip
dev-python/panel: add 0.14.1, 0.14.2
Also replaced sed with PATCH to respect Python syntax Signed-off-by: Horea Christian <chr@chymera.eu>
-rw-r--r--dev-python/panel/Manifest2
-rw-r--r--dev-python/panel/files/panel-0.14.1-disable_lite_build.patch47
-rw-r--r--dev-python/panel/panel-0.14.1.ebuild55
-rw-r--r--dev-python/panel/panel-0.14.2.ebuild55
4 files changed, 159 insertions, 0 deletions
diff --git a/dev-python/panel/Manifest b/dev-python/panel/Manifest
index dacf388f1..5bd9272be 100644
--- a/dev-python/panel/Manifest
+++ b/dev-python/panel/Manifest
@@ -1 +1,3 @@
DIST panel-0.11.0.tar.gz 9682808 BLAKE2B 2f953aaa9e791433d254219ad3cf9efdd486164e713f41a3539628a6c87f5b7b800ebd166537d021799ce74dddd3bc259343e6ec4161d0d87393864502215a00 SHA512 6fa2e04dd758583db851fa7d36592b7fb10ad2838b1f51fb53cb9ead4b5504a975ca040525f3f210ff0a67e8ce579195d980570b2d7616308cc126c61a9e9f59
+DIST panel-0.14.1.tar.gz 20052944 BLAKE2B 225c42562f7b5922380eca6f58da38ef228dbcb46ada930f7e0423fe2ce0d81d23d026b3f375a5bd46b521f6e49293f861cf92bc4d5044414818e0e1f787b0de SHA512 4d730a4555fffcb543b22900a17ad377eadb36a890ecc6cf873726da12c067d1cfeaf9626a0e4559b5c08e5646abb5c5cc0f28201341d9989f2c8fb345f8ecbd
+DIST panel-0.14.2.tar.gz 20352366 BLAKE2B 429a2da7e92cc1b0f3a42fc120eddc4a8a54e3805c1ca249aad7c243cef0092959e62a13b0f9c64c4765a6d2533b6519a90640e85d4d512a257df40fff1a4522 SHA512 c611e4bc592edeca5920441102cf7baea336016b9f90778c05fc61c57a4b8b48c80e16c182daa1763440be10c6a0ffabb80699bf6aaa96e03566b4ac55b56f4b
diff --git a/dev-python/panel/files/panel-0.14.1-disable_lite_build.patch b/dev-python/panel/files/panel-0.14.1-disable_lite_build.patch
new file mode 100644
index 000000000..387cfb61b
--- /dev/null
+++ b/dev-python/panel/files/panel-0.14.1-disable_lite_build.patch
@@ -0,0 +1,47 @@
+Subject: Prevent Panel from violating network sandboxing.
+
+ * By default, "setup.py" invokes "npm" to rebuild Node.js packages bundled with Panel.
+ * Without this patch we get `error: HTTPSConnectionPool`
+ * A `sed` fix of the `_build_paneljs()` line will break the syntax.
+ * Using the `PANEL_LITE_BUILD` variable might do the trick instead of a patch, but thus far it didn't
+Author: Horea Christian <gentoo@chymera.eu>
+diff --git a/setup.py b/setup.py
+index d2541dfb..8cfbf933 100644
+--- a/setup.py
++++ b/setup.py
+@@ -54,8 +54,6 @@ class CustomDevelopCommand(develop):
+ """Custom installation for development mode."""
+
+ def run(self):
+- if not PANEL_LITE_BUILD:
+- _build_paneljs()
+ develop.run(self)
+
+
+@@ -63,8 +61,6 @@ class CustomInstallCommand(install):
+ """Custom installation for install mode."""
+
+ def run(self):
+- if not PANEL_LITE_BUILD:
+- _build_paneljs()
+ install.run(self)
+
+
+@@ -72,8 +68,6 @@ class CustomSdistCommand(sdist):
+ """Custom installation for sdist mode."""
+
+ def run(self):
+- if not PANEL_LITE_BUILD:
+- _build_paneljs()
+ sdist.run(self)
+
+
+@@ -92,8 +86,6 @@ try:
+
+ def run(self):
+ """Do nothing so the command intentionally fails."""
+- if not PANEL_LITE_BUILD:
+- _build_paneljs()
+ bdist_wheel.run(self)
+
+ _COMMANDS['bdist_wheel'] = CustomBdistWheelCommand
diff --git a/dev-python/panel/panel-0.14.1.ebuild b/dev-python/panel/panel-0.14.1.ebuild
new file mode 100644
index 000000000..aa535f46f
--- /dev/null
+++ b/dev-python/panel/panel-0.14.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..10} )
+
+# Panel imports from "distutils" at runtime.
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="High-level app and dashboarding solution for Python"
+HOMEPAGE="https://panel.holoviz.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# "setup.py" imports from Bokeh to rebuild Node.js packages, but we patch that
+# away below. Our patched Panel thus requires Bokeh only at runtime.
+DEPEND="
+ >=dev-python/param-1.10.0[${PYTHON_USEDEP}]
+ >=dev-python/pyct-0.4.4[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ dev-python/markdown[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ >=dev-python/bokeh-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/pyviz_comms-0.7.4[${PYTHON_USEDEP}]
+ >=net-libs/nodejs-15.11.0
+"
+
+PATCHES=( "${FILESDIR}/${P}-disable_lite_build.patch" )
+
+src_prepare() {
+ # Install Jupyter configuration files to "/etc" rather than "/usr/etc".
+ sed -i -e 's~"etc/jupyter~"/etc/jupyter~' setup.py || die
+
+ default_src_prepare
+}
+
+pkg_postinst() {
+ panel_pkg_postinst() {
+ PANEL_DIR="$(${EPYTHON} -c 'import os, panel; print(os.path.dirname(panel.__file__))')"
+ elog "Node.js packages bundled with Panel under ${EPYTHON} may be"
+ elog "desynchronized from Bokeh and require manual rebuilding with:"
+ elog " sudo ${EPYTHON} -m panel build \"${PANEL_DIR}\""
+ elog
+ }
+
+ python_foreach_impl panel_pkg_postinst
+}
diff --git a/dev-python/panel/panel-0.14.2.ebuild b/dev-python/panel/panel-0.14.2.ebuild
new file mode 100644
index 000000000..ea5e77d3e
--- /dev/null
+++ b/dev-python/panel/panel-0.14.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..10} )
+
+# Panel imports from "distutils" at runtime.
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="High-level app and dashboarding solution for Python"
+HOMEPAGE="https://panel.holoviz.org"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# "setup.py" imports from Bokeh to rebuild Node.js packages, but we patch that
+# away below. Our patched Panel thus requires Bokeh only at runtime.
+DEPEND="
+ >=dev-python/param-1.10.0[${PYTHON_USEDEP}]
+ >=dev-python/pyct-0.4.4[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ dev-python/markdown[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ >=dev-python/bokeh-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/pyviz_comms-0.7.4[${PYTHON_USEDEP}]
+ >=net-libs/nodejs-15.11.0
+"
+
+PATCHES=( "${FILESDIR}/${PN}-0.14.1-disable_lite_build.patch" )
+
+src_prepare() {
+ # Install Jupyter configuration files to "/etc" rather than "/usr/etc".
+ sed -i -e 's~"etc/jupyter~"/etc/jupyter~' setup.py || die
+
+ default_src_prepare
+}
+
+pkg_postinst() {
+ panel_pkg_postinst() {
+ PANEL_DIR="$(${EPYTHON} -c 'import os, panel; print(os.path.dirname(panel.__file__))')"
+ elog "Node.js packages bundled with Panel under ${EPYTHON} may be"
+ elog "desynchronized from Bokeh and require manual rebuilding with:"
+ elog " sudo ${EPYTHON} -m panel build \"${PANEL_DIR}\""
+ elog
+ }
+
+ python_foreach_impl panel_pkg_postinst
+}