From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B9D8D15800F for ; Sun, 15 Jan 2023 17:25:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CF62E03DF; Sun, 15 Jan 2023 17:25:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6101EE03DF for ; Sun, 15 Jan 2023 17:25:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 43F2F3407E0 for ; Sun, 15 Jan 2023 17:25:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 08D087F4 for ; Sun, 15 Jan 2023 17:25:18 +0000 (UTC) From: "Horea Christian" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Horea Christian" Message-ID: <1673803493.5857ad8b9eb2c589505e2ae90f4492af4907cf56.chymera@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: dev-python/panel/, dev-python/panel/files/ X-VCS-Repository: proj/sci X-VCS-Files: dev-python/panel/files/panel-0.14.1-disable_lite_build.patch dev-python/panel/panel-0.14.1.ebuild dev-python/panel/panel-0.14.2.ebuild X-VCS-Directories: dev-python/panel/files/ dev-python/panel/ X-VCS-Committer: chymera X-VCS-Committer-Name: Horea Christian X-VCS-Revision: 5857ad8b9eb2c589505e2ae90f4492af4907cf56 X-VCS-Branch: master Date: Sun, 15 Jan 2023 17:25:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 311d145c-155d-4bad-8e92-6a55f7a245f9 X-Archives-Hash: 120225da69454786853b69089cd4c1d9 commit: 5857ad8b9eb2c589505e2ae90f4492af4907cf56 Author: Horea Christian chymera eu> AuthorDate: Sun Jan 15 17:24:02 2023 +0000 Commit: Horea Christian gmail com> CommitDate: Sun Jan 15 17:24:53 2023 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5857ad8b dev-python/panel: add 0.14.1, 0.14.2 Also replaced sed with PATCH to respect Python syntax Signed-off-by: Horea Christian chymera.eu> .../files/panel-0.14.1-disable_lite_build.patch | 47 ++++++++++++++++++ dev-python/panel/panel-0.14.1.ebuild | 55 ++++++++++++++++++++++ dev-python/panel/panel-0.14.2.ebuild | 55 ++++++++++++++++++++++ 3 files changed, 157 insertions(+) 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 +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 +}