From fb798b356a68295f15e62ea16a74b69152ade2c3 Mon Sep 17 00:00:00 2001 From: Gilver Date: Tue, 27 May 2025 00:43:24 -0500 Subject: [PATCH] add: bash-kernel (#5052) * add: bash-kernel * add: bash-kernel * Society has moved past the need for %generate_buildrequires Signed-off-by: Gilver * Update python-bash-kernel.spec Signed-off-by: Gilver * Update python-bash-kernel.spec Signed-off-by: Gilver --------- Signed-off-by: Gilver --- anda/langs/python/bash-kernel/anda.hcl | 9 +++ .../bash-kernel/python-bash-kernel.spec | 65 +++++++++++++++++++ anda/langs/python/bash-kernel/update.rhai | 1 + 3 files changed, 75 insertions(+) create mode 100644 anda/langs/python/bash-kernel/anda.hcl create mode 100644 anda/langs/python/bash-kernel/python-bash-kernel.spec create mode 100644 anda/langs/python/bash-kernel/update.rhai diff --git a/anda/langs/python/bash-kernel/anda.hcl b/anda/langs/python/bash-kernel/anda.hcl new file mode 100644 index 0000000000..8331b23526 --- /dev/null +++ b/anda/langs/python/bash-kernel/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-bash-kernel.spec" + } + labels { + subrepo = "extras" + } +} diff --git a/anda/langs/python/bash-kernel/python-bash-kernel.spec b/anda/langs/python/bash-kernel/python-bash-kernel.spec new file mode 100644 index 0000000000..398774f3fb --- /dev/null +++ b/anda/langs/python/bash-kernel/python-bash-kernel.spec @@ -0,0 +1,65 @@ +# Mostly taken from Fedora, but updated because despite Fedora marking this project as abandoned it is not + +%global pypi_name bash_kernel +%global real_name bash-kernel + +Name: python-%{real_name} +Version: 0.10.0 +Release: 1%{?dist} +Summary: Bash kernel for Jupyter +License: BSD-3-Clause +URL: https://github.com/takluyver/bash_kernel +Source: %{pypi_source} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(filetype) +BuildRequires: python3dist(flit-core) +BuildRequires: python3dist(ipykernel) +BuildRequires: python3dist(pexpect) +BuildRequires: python3dist(pip) +BuildRequires: %{py3_dist docutils} +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} +BuildArch: noarch +Packager: Gilver E. + +%description +This package contains a Jupyter kernel for bash. + +%package -n python3-%{real_name} +Summary: %{summary} +Requires: bash +Requires: python-jupyter-filesystem + +%description -n python3-%{real_name} +This package contains a Jupyter kernel for bash. + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +# Work around an install error +sed -i 's/from \.resources/from %{pypi_name}.resources/' %{pypi_name}/install.py + +%build +%pyproject_wheel +rst2html --no-datestamp README.rst README.html + +%install +%pyproject_install +%pyproject_save_files %{pypi_name} +export PYTHONPATH=$PWD +cd %{pypi_name} +%{python3} install.py --prefix %{buildroot}%{_prefix} +cd - + +%check +%pyproject_check_import + +%files -n python3-%{real_name} -f %{pyproject_files} +%doc README.html +%license LICENSE +%{_datadir}/jupyter/kernels/bash/ + +%changelog +* Mon May 26 2025 Gilver E. - 0.10.0-1 +- Initial port from Fedora diff --git a/anda/langs/python/bash-kernel/update.rhai b/anda/langs/python/bash-kernel/update.rhai new file mode 100644 index 0000000000..6d98ddf008 --- /dev/null +++ b/anda/langs/python/bash-kernel/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("bash_kernel"));