From 600a6d0045a102d6c014c9d4b71e4d99abba07d915ea303825ab24e11439f1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 13 Jun 2025 10:14:01 +0000 Subject: [PATCH 1/4] - Convert to pip-based build and libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=11 --- python-srcinfo.changes | 5 +++++ python-srcinfo.spec | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/python-srcinfo.changes b/python-srcinfo.changes index 9a1d7d8..4b52e6a 100644 --- a/python-srcinfo.changes +++ b/python-srcinfo.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 13 10:13:37 UTC 2025 - Markéta Machová + +- Convert to pip-based build and libalternatives + ------------------------------------------------------------------- Fri Dec 8 16:06:46 UTC 2023 - Dirk Müller diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 35b34f7..7f753ca 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -1,7 +1,7 @@ # # spec file for package python-srcinfo # -# Copyright (c) 2023 SUSE LLC +# 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 @@ -16,6 +16,7 @@ # +%bcond_without libalternatives Name: python-srcinfo Version: 0.1.2 Release: 0 @@ -24,12 +25,14 @@ License: ISC Group: Development/Languages/Python URL: https://github.com/kyrias/python-srcinfo Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-parse >= 1.19.0 -Requires(post): update-alternatives -Requires(postun):update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module parse >= 1.19.0} @@ -45,21 +48,18 @@ Python library to parse Arch .SRCINFO files. mv test/__init__.py test_srcinfo.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/parse_srcinfo %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest -%post -%python_install_alternative parse_srcinfo - -%postun -%python_uninstall_alternative parse_srcinfo +%pre +%python_libalternatives_reset_alternative parse_srcinfo %files %{python_files} %doc README.rst From 01e333661b15596a1a72b9031155253910d0908119f30d6974997e11f2d80aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 13 Jun 2025 10:17:21 +0000 Subject: [PATCH 2/4] fix deps OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=12 --- python-srcinfo.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 7f753ca..8db3aaf 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -26,7 +26,7 @@ Group: Development/Languages/Python URL: https://github.com/kyrias/python-srcinfo Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module wheel} BuildRequires: alts BuildRequires: fdupes From 50125d09b16af620822ff7ecab69022c9d75e267a6ef9118cf0e9763e33f556d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 13 Jun 2025 10:53:23 +0000 Subject: [PATCH 3/4] rollback to setuptools, poetry didn't generate the binary OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=13 --- python-srcinfo.changes | 2 +- python-srcinfo.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python-srcinfo.changes b/python-srcinfo.changes index 4b52e6a..3aedb61 100644 --- a/python-srcinfo.changes +++ b/python-srcinfo.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Fri Jun 13 10:13:37 UTC 2025 - Markéta Machová -- Convert to pip-based build and libalternatives +- Convert to libalternatives ------------------------------------------------------------------- Fri Dec 8 16:06:46 UTC 2023 - Dirk Müller diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 8db3aaf..0c70eb1 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -26,7 +26,7 @@ Group: Development/Languages/Python URL: https://github.com/kyrias/python-srcinfo Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz BuildRequires: %{python_module pip} -BuildRequires: %{python_module poetry-core} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: alts BuildRequires: fdupes @@ -48,10 +48,10 @@ Python library to parse Arch .SRCINFO files. mv test/__init__.py test_srcinfo.py %build -%pyproject_wheel +%python_build %install -%pyproject_install +%python_install %python_clone -a %{buildroot}%{_bindir}/parse_srcinfo %python_expand %fdupes %{buildroot}%{$python_sitelib} From 953e461d9abf6d3c81d9b3a36a69475dee9c084e9851c2a06f592f45d5df706e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 13 Jun 2025 10:54:16 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=14 --- python-srcinfo.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 0c70eb1..17a8348 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -25,9 +25,7 @@ License: ISC Group: Development/Languages/Python URL: https://github.com/kyrias/python-srcinfo Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz -BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module wheel} BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros