From 1c2fa89972860d91961219ccc62cea87ee1f09540a419d3c6752b98f29a557a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 10 Jun 2025 12:38:15 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyte?expand=0&rev=20 --- .gitattributes | 23 ++++++ .gitignore | 1 + pyte-0.8.2.tar.gz | 3 + python-pyte.changes | 168 ++++++++++++++++++++++++++++++++++++++++++++ python-pyte.spec | 69 ++++++++++++++++++ 5 files changed, 264 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyte-0.8.2.tar.gz create mode 100644 python-pyte.changes create mode 100644 python-pyte.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/pyte-0.8.2.tar.gz b/pyte-0.8.2.tar.gz new file mode 100644 index 0000000..6c4b682 --- /dev/null +++ b/pyte-0.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5af970e843fa96a97149d64e170c984721f20e52227a2f57f0a54207f08f083f +size 92301 diff --git a/python-pyte.changes b/python-pyte.changes new file mode 100644 index 0000000..36c797d --- /dev/null +++ b/python-pyte.changes @@ -0,0 +1,168 @@ +------------------------------------------------------------------- +Tue Jun 10 12:37:59 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Thu Dec 14 21:29:20 UTC 2023 - Dirk Müller + +- update to 0.8.2: + * Added py.typed to the source archive and wheel files. + +------------------------------------------------------------------- +Sat Jun 4 20:34:46 UTC 2022 - Arun Persaud + +- specfile: + * update copyright year + * require python >= 3.7 + * be more specific in %files section + +- update to version 0.8.1: + * Yet another fix of "Screen.set_margins" for the case of CSI with + no arguments. See issue #61 on GitHub. + * Changed "Screen.erase_in_display" to accept additional positional + arguments as some some "clear" implementations include a ";" after + the first parameter causing "pyte" to assume a "0" second + parameter. + * Changed "Stream" FSM to reinit on error when parsing control + sequence. + * Added support for blink to the SGR handler. See PR #120 on GitHub. + Thanks to @eight04! + * Changed "Stream" to skip XTerm-specific "ESC]...$[a-z]" sequences. + See issue #117 on GitHub. + * Dropped Python 2.X support. The minimal required version of Python + is now 3.7. + +------------------------------------------------------------------- +Fri May 28 07:59:26 UTC 2021 - pgajdos@suse.com + +- %check: use %pytest rpm macro + +------------------------------------------------------------------- +Tue Dec 4 12:52:55 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Sun Jul 8 16:42:49 UTC 2018 - tchvatal@suse.com + +- Enable tests unconditionaly + +------------------------------------------------------------------- +Sat Jul 7 17:08:25 UTC 2018 - arun@gmx.de + +- specfile: + * update copyright year + +- update to version 0.8.0: + * Modified the logic around tracking position in the + "HistoryScreen", allowing the full history to be accessed. See PR + #96 on GitHub. + * Send C0 encoded CSI instead of C1, avoiding compatibility issues + with unicode. See issue #99 on GitHub. + * Changed "Stream" to really ignore "SI" in UTF-8 mode. See PR #106 + on GitHub. Thanks to @jwodder! + * Fixed `DECSCNM` handling bug. The attributes of + "Screen.default_char" were not reversed leaving all blank + characters as-is. See PR #102 on GitHub. Thanks to @zblz! + * Correctly terminate OSC mode in "Stream" on receipt of a C0 + encoded "ST" character. + * Allowed resetting cursor attributes in the middle of the SGR + sequence. See PR#109 on GiHub. Thanks @andreivasiliu! + * On exit from `DECCOLM` mode, restore the terminal width from + before entering `DECCOLM` mode. + * Changed "Screen.select_graphic_rendition" to ignore + malformed256/24bit colours. See issue #115 on GitHub. + +------------------------------------------------------------------- +Fri Nov 3 15:54:05 UTC 2017 - arun@gmx.de + +- update to version 0.7.0: + * Removed deprecated "only" parameter of "Stream.attach". + * Removed deprecated "encoding" parameter of "ByteStream". + * Fixed "how == 3" handling in "DiffScreen.erase_in_display". + * Deprecated "DiffScreen". Its functionality has been backported to + the base "Screen" class. + * Fixed a bug in "DiffScreen.draw" which incorrectly handled the + case when the input of "draw" required several lines. + * Fixed a bug in "Screen" which did not ignore "ESC (" argument in + UTF8 mode. See issue #88 on GitHub. + * Changed "Screen.resize" to do nothing if the requested size + matches the current one. + * Disallowed private mode for + "Screen.report_device_attributes". This was causing an infinite + loop in Emacs and Vim. See issue #81 on GitHub. + * Fixed a bug in `OSC` parsing, which caused "Stream" to hang upon + receiving a palette reset request "ESC ] R". + * Changed "Screen.reset" not to reset `DECOM`. See discussion in + issue #95 on Github. + * Changed the first tabstop to be at the 9-th column. See PR #98 on + GitHub. Thanks to @gordon-quad! + +------------------------------------------------------------------- +Sun Sep 3 11:17:17 UTC 2017 - jengelh@inai.de + +- Replace python-curtsies description by python-pyte's. + +------------------------------------------------------------------- +Thu Aug 31 21:23:16 UTC 2017 - toddrme2178@gmail.com + +- Update to 0.6.0 + * Optimized ``Stream.feed`` for plain-text input. The code was backported + from ``pymux`` project by Jonathan Slenders. + * Optimized ``Screen`` by changing ``Screen.buffer`` to dict-of-dicts. The + idea was borrowed from ``pymux`` project by Jonathan Slenders. The + implementation was done by @istarion. + * Further optimized ``Stream._parser_fsm`` by forcing static binding between + ``Stream`` events and ``Screen`` methods. The code was backported from + ``pmux`` project by Jonathan Slenders. + * Restricted ``Stream`` to a single listener and deprecated ``attach`` and + ``detach``. The old logic can be emulated by a fanout proxy, forwarding + events to a list of its listeners. + * Replaced ``DebugStream`` with ``DebugScreen`` to workaround the single + listener limitation (previsouly ``DebugStream`` implicitly added a + listener when instantiated). Unlike other screens ``DebugScreen`` does + not maintain any state. + * Changed ``DebugScreen`` to emit JSON instead of custom text format. + * Removed overly generic ``Screen.__before__`` and ``Screen.__after__``. + * Renamed ``Screen.set_charset`` to a more appropriate + ``Screen.define_charset``. + * Added support for ECMA-035 `DOCS` command to ``ByteStream`` which no longer + accepts ``encoding`` as an argument and instead sets it as instructed by + `DOCS`. The default encoding is assumed to be UTF-8. + * Added support for OSC sequences allowing to set terminal title and + icon name. + * Allowed 256 and 24bit colours in ``Screen.select_graphic_rendition``. + * Added support for ``aixterm`` colours in ``Screen.select_graphic_rendition``, + see issue #57 on GitHub. + * Changed ``Screen.select_graphic_rendition`` to ignore 0 if it is + given along with other attributes, ie ``"0;1;2"`` is now equivalent + to ``"1;2"``. + * Fixed rendering of multicolumn characters at ``Screen` boundaries. + Thanks to @shaform! See PR #55 on GitHub. + * Fixed ``Screen.display`` in the case of multicolumn characters. See + issue #52 on GitHub. + * Fixed `DECSTBM` handling in case of missing arguments. See issue #61 on + GitHub. + * Fixed the way ``Screen.cursor_up`` and ``Screen.cursor_down`` interact + with the scrolling region. See #63 on GitHub. + * Added a minimal web terminal example by @demiurg906. For a faster and + more fully-featured version, see + `demiurg906/pyte_gui `_. + * Fixed ``Screen.cursor_back`` when called after the draw in the last column. + * Fixed ``Screen.inser_characters`` when called with an argument larger + than the number of columns. Thanks to @istarion! See PR #74 on GitHub. + * Fixed ``Screen.erase_in_display`` which did not handle all values supported + by ``TERM=linux``. See #80 on GitHub. + +------------------------------------------------------------------- +Thu Aug 24 13:52:22 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Mon Aug 15 00:54:36 UTC 2016 - badshah400@gmail.com + +- Initial package. + + diff --git a/python-pyte.spec b/python-pyte.spec new file mode 100644 index 0000000..4d124b7 --- /dev/null +++ b/python-pyte.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-pyte +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-pyte +Version: 0.8.2 +Release: 0 +Summary: VTXXX-compatible linux terminal emulator +License: LGPL-3.0-only +Group: Development/Languages/Python +URL: https://github.com/selectel/pyte +Source: https://files.pythonhosted.org/packages/source/p/pyte/pyte-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wcwidth} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: python-wcwidth +BuildArch: noarch +%python_subpackages + +%description +An in-memory VTXXX-compatible terminal emulator supporting VT100 and +other DEC VTs between 1970 and 1995. pyte can be used to: + +* screen scrape terminal apps, for example htop or aptitude. +* write terminal emulators; either with a graphical (xterm, rxvt) + or a web interface, like AjaxTerm. + +%prep +%setup -q -n pyte-%{version} +# all fail as missing data files +rm tests/test_input_output.py +sed -i '/pytest-runner/d' setup.py + +%build +%pyproject_wheel + +%install +%pyproject_install + +%check +%pytest + +%files %{python_files} +%license LICENSE +%doc README AUTHORS CHANGES docs/*rst +%dir %{python_sitelib}/pyte +%{python_sitelib}/pyte/* +%{python_sitelib}/pyte-%{version}*-info + +%changelog