From 858b49f973e1368f534bf6e8d2f5de5784237e7241f31fb1244c2c51221a864c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 1 Jun 2024 08:54:05 +0000 Subject: [PATCH] Accepting request 1178019 from home:ojkastl_buildservice:Branch_devel_languages_python new package python-demosh: Run code in Markdown files or shell scripts very interactively, to allow more engaging demos OBS-URL: https://build.opensuse.org/request/show/1178019 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-demosh?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + demosh-0.5.0.tar.gz | 3 ++ python-demosh.changes | 5 +++ python-demosh.spec | 78 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 demosh-0.5.0.tar.gz create mode 100644 python-demosh.changes create mode 100644 python-demosh.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/demosh-0.5.0.tar.gz b/demosh-0.5.0.tar.gz new file mode 100644 index 0000000..db55448 --- /dev/null +++ b/demosh-0.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b33d23e4d18c038a97baf8fbc4f4a4b551d631af0f8a4bb8a8e57bde257bc6f +size 28452 diff --git a/python-demosh.changes b/python-demosh.changes new file mode 100644 index 0000000..b629795 --- /dev/null +++ b/python-demosh.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed May 29 20:40:57 UTC 2024 - Johannes Kastl + +- new package python-demosh: Run code in Markdown files or shell + scripts very interactively, to allow more engaging demos diff --git a/python-demosh.spec b/python-demosh.spec new file mode 100644 index 0000000..cea1a01 --- /dev/null +++ b/python-demosh.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-demosh +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-demosh +Version: 0.5.0 +Release: 0 +Summary: Run code in Markdown files or shell scripts very interactively +License: Apache-2.0 +URL: https://github.com/BuoyantIO/demosh +Source: https://github.com/BuoyantIO/demosh/archive/%{version}.tar.gz#/demosh-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module flit} +BuildRequires: %{python_module wheel} +# SECTION test +BuildRequires: %{python_module pytest} +# /SECTION +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +tl;dr: demosh can run shell scripts or Markdown files in a very interactive +way, showing commentary in between running commands, and waiting for you to hit +RETURN to proceed before running commands. It was created as a tool for doing +live demos of relatively complex things. See testing.md and testing.sh for +examples. + +%prep +%autosetup -n demosh-%{version} + +sed -i 's#usr/bin/env python#usr/bin/python3#g' demosh/*.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand chmod +x %{buildroot}/%{$python_sitelib}/demosh/*.py +%python_expand %fdupes %{buildroot}/%{$python_sitelib}/ +%python_clone -a %{buildroot}%{_bindir}/demosh + +# no checks available upstream + +%post +%python_install_alternative demosh + +%postun +%python_uninstall_alternative demosh + +%files %{python_files} +%doc README.md +%license LICENSE +%python_alternative %{_bindir}/demosh +%{python_sitelib}/demosh +%{python_sitelib}/demosh-%{version}*-info +%pycache_only %{python_sitelib}/demosh/__pycache__/ + +%changelog