commit efae5050e95532a3eb558d687351d0204b0ad229d04099a566feb52326119d49 Author: Dominik Heidler Date: Thu Feb 6 00:23:48 2025 +0000 - Initial checkin OBS-URL: https://build.opensuse.org/package/show/home:dheidler/python-rshell?expand=0&rev=1 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/python-rshell.changes b/python-rshell.changes new file mode 100644 index 0000000..4173324 --- /dev/null +++ b/python-rshell.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Feb 6 00:02:33 UTC 2025 - Dominik Heidler + +- Initial checkin diff --git a/python-rshell.spec b/python-rshell.spec new file mode 100644 index 0000000..c9ae851 --- /dev/null +++ b/python-rshell.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-rshell +# +# Copyright (c) 2025 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/ +# + + +Name: python-rshell +Version: 0.0.36 +Release: 0 +Summary: Remote MicroPython shell +License: MIT +URL: https://github.com/dhylands/rshell +Source0: https://github.com/dhylands/rshell/archive/refs/tags/v0.0.36.tar.gz#/rshell-%{version}.tar.gz +BuildArch: noarch +BuildRequires: %{python_module base >= 3.6} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python3-pyserial +Requires: python3-pyudev +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages + +%description +This is a simple shell which runs on the host and uses MicroPython's raw-REPL to send python snippets to the pyboard in order to get filesystem information, and to copy files to and from MicroPython's filesystem. +It also has the ability to invoke the regular REPL, so rshell can be used as a terminal emulator as well. + +%prep +%autosetup -n rshell-%{version} +# don't package tests +sed -i -e "s/, 'tests'//" setup.py +# remove useless shebangs +sed -i -e 's_#!/usr/bin/env python3__' rshell/*.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python3_fix_shebang +%python_clone -a %{buildroot}%{_bindir}/rshell +%python_clone -a %{buildroot}%{_bindir}/pyboard +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%pre +%python_libalternatives_reset_alternative rshell pyboard + +%post +%{python_install_alternative rshell pyboard} + +%postun +%python_uninstall_alternative rshell pyboard + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/rshell +%{python_sitelib}/rshell-%{version}.dist-info +%python_alternative %{_bindir}/rshell +%python_alternative %{_bindir}/pyboard + +%changelog + diff --git a/rshell-0.0.36.tar.gz b/rshell-0.0.36.tar.gz new file mode 100644 index 0000000..3ba9a9a --- /dev/null +++ b/rshell-0.0.36.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db6e6c19714caf227c18a3ccf3d27b2b3126b1cbbf293c80b3ab1cefafd8cc9f +size 42737