From 60b2dece408a4821a6492a01e5f686451561a25264a362d6e3a2c640d3474efd Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 18 Dec 2024 01:05:18 +0000 Subject: [PATCH] Accepting request 1229068 from home:nkrapp:FrameworkLaptop I want to maintain this package in Factory and would like to use hardware as the devel project. I couldn't get it to build with the services using the tar_scm service and only the tarball so I'm using the obscpio archive OBS-URL: https://build.opensuse.org/request/show/1229068 OBS-URL: https://build.opensuse.org/package/show/hardware/python-framework16_inputmodule?expand=0&rev=1 --- .gitattributes | 24 ++++++++ .gitignore | 4 ++ _service | 14 +++++ inputmodule-rs-20241125.d9f18af.obscpio | 3 + inputmodule-rs.obsinfo | 4 ++ python-framework16_inputmodule.changes | 39 ++++++++++++ python-framework16_inputmodule.spec | 82 +++++++++++++++++++++++++ 7 files changed, 170 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 inputmodule-rs-20241125.d9f18af.obscpio create mode 100644 inputmodule-rs.obsinfo create mode 100644 python-framework16_inputmodule.changes create mode 100644 python-framework16_inputmodule.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.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 +*.tar 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..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/_service b/_service new file mode 100644 index 0000000..1928089 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://github.com/FrameworkComputer/inputmodule-rs + main + %cd.%h + git + + + + + gz + *.tar + + diff --git a/inputmodule-rs-20241125.d9f18af.obscpio b/inputmodule-rs-20241125.d9f18af.obscpio new file mode 100644 index 0000000..30231d9 --- /dev/null +++ b/inputmodule-rs-20241125.d9f18af.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e67e9a41233c9ce6a2e633c255c2222c127cd050897baf978592922aee7377eb +size 713740 diff --git a/inputmodule-rs.obsinfo b/inputmodule-rs.obsinfo new file mode 100644 index 0000000..b599da3 --- /dev/null +++ b/inputmodule-rs.obsinfo @@ -0,0 +1,4 @@ +name: inputmodule-rs +version: 20241125.d9f18af +mtime: 1732519694 +commit: d9f18afb31d00a294e7bbb7395e2226b213b6733 diff --git a/python-framework16_inputmodule.changes b/python-framework16_inputmodule.changes new file mode 100644 index 0000000..82d526a --- /dev/null +++ b/python-framework16_inputmodule.changes @@ -0,0 +1,39 @@ +------------------------------------------------------------------- +Wed Dec 4 12:38:51 UTC 2024 - Nico Krapp + +- enable Python3.13 build again +- drop extra LICENSE file as it is included in the github tarball + +------------------------------------------------------------------- +Mon Dec 2 15:44:58 UTC 2024 - Nico Krapp + +- fix dependency on renamed package framework-inputmodule-control + +------------------------------------------------------------------- +Mon Dec 2 10:39:55 UTC 2024 - Nico Krapp + +- switch version to git revision to include important fixes + * Use tkinter build GUI instead of PySimpleGUI + * docs: Add details about developing python +- drop replace-pysimplegui.patch, merged upstream + +------------------------------------------------------------------- +Tue Nov 19 15:24:41 UTC 2024 - Nico Krapp + +- add sle15_python_module_pythons macro + +------------------------------------------------------------------- +Tue Nov 19 15:16:09 UTC 2024 - Nico Krapp + +- temporarily disable Python3.13 until modules are stable + +------------------------------------------------------------------- +Tue Nov 19 12:03:40 UTC 2024 - Nico Krapp + +- Add replace-pysimplegui.patch to replace PySimpleGUI dependency with tkinter + * https://github.com/FrameworkComputer/inputmodule-rs/pull/130 + +------------------------------------------------------------------- +Mon Nov 18 16:01:44 UTC 2024 - Nico Krapp + +- initial version 0.1.1 diff --git a/python-framework16_inputmodule.spec b/python-framework16_inputmodule.spec new file mode 100644 index 0000000..090c06a --- /dev/null +++ b/python-framework16_inputmodule.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-framework16_inputmodule +# +# Copyright (c) 2024 Nico Krapp +# +# 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/ +# + + +%define stable_version 0.1.1 +%define reponame inputmodule-rs +%{?sle15_python_module_python} +Name: python-framework16_inputmodule +Version: 20241125.d9f18af +Release: 0 +Summary: A library to control input modules on the Framework 16 Laptop +License: MIT +URL: https://github.com/FrameworkComputer/inputmodule-rs +Source: %{reponame}-%{version}.tar.gz +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pyserial} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: framework-inputmodule-control +Requires: python-Pillow +Requires: python-base >= 3.7 +Requires: python-getkey +Requires: python-pyserial +Requires: python-pygame +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +A library to control input modules on the Framework 16 Laptop + +%prep +%autosetup -p1 -n %{reponame}-%{version} +cd python/ +sed -E -i "1{s|^#\!\s*/usr/bin/env python3$|#\!%{_bindir}/python3|}" inputmodule/cli.py +sed -E -i "1{s|^#\!\s*/usr/bin/env python3$|#\!%{_bindir}/python3|}" inputmodule/uf2conv.py + +%build +cd python/ +%pyproject_wheel + +%install +cd python/ +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/ledmatrixctl +%python_clone -a %{buildroot}%{_bindir}/ledmatrixgui +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%post +%python_install_alternative ledmatrixctl ledmatrixgui + +%postun +%python_uninstall_alternative ledmatrixctl ledmatrixgui + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/inputmodule +%attr(755, -, -) %{python_sitelib}/inputmodule/uf2conv.py +%{python_sitelib}/inputmodule-%{stable_version}.dist-info +%python_alternative %{_bindir}/ledmatrixctl +%python_alternative %{_bindir}/ledmatrixgui + +%changelog