Compare commits

7 Commits

Author SHA256 Message Date
e6d3872c0c Accepting request 1285932 from devel:languages:python
- Switch to autosetup and pyproject macros.
- List files and directories explicitly in %files.
- Add patch support-new-poetry.patch:
  * Do not use deprecated sections in pyproject.toml.

OBS-URL: https://build.opensuse.org/request/show/1285932
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-srcinfo?expand=0&rev=7
2025-06-16 09:12:48 +00:00
9a7b3f4c91 - Switch to autosetup and pyproject macros.
- List files and directories explicitly in %files.
- Add patch support-new-poetry.patch:
  * Do not use deprecated sections in pyproject.toml.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=16
2025-06-16 02:53:43 +00:00
6ff7455401 Accepting request 1285422 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1285422
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-srcinfo?expand=0&rev=6
2025-06-13 16:47:02 +00:00
953e461d9a OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=14 2025-06-13 10:54:16 +00:00
50125d09b1 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
2025-06-13 10:53:23 +00:00
01e333661b fix deps
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=12
2025-06-13 10:17:21 +00:00
600a6d0045 - Convert to pip-based build and libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-srcinfo?expand=0&rev=11
2025-06-13 10:14:01 +00:00
3 changed files with 54 additions and 14 deletions

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Jun 16 02:53:21 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to autosetup and pyproject macros.
- List files and directories explicitly in %files.
- Add patch support-new-poetry.patch:
* Do not use deprecated sections in pyproject.toml.
-------------------------------------------------------------------
Fri Jun 13 10:13:37 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 8 16:06:46 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Dec 8 16:06:46 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-srcinfo # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,23 @@
# #
%bcond_without libalternatives
Name: python-srcinfo Name: python-srcinfo
Version: 0.1.2 Version: 0.1.2
Release: 0 Release: 0
Summary: Python library to parse Arch SRCINFO files Summary: Python library to parse Arch SRCINFO files
License: ISC License: ISC
Group: Development/Languages/Python
URL: https://github.com/kyrias/python-srcinfo URL: https://github.com/kyrias/python-srcinfo
Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/srcinfo/srcinfo-%{version}.tar.gz
BuildRequires: %{python_module setuptools} # PATCH-FIX-OPENSUSE Do not use deprecated sections in pyproject.toml
Patch0: support-new-poetry.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-parse >= 1.19.0 Requires: python-parse >= 1.19.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module parse >= 1.19.0} BuildRequires: %{python_module parse >= 1.19.0}
@@ -41,30 +44,28 @@ BuildRequires: %{python_module pytest}
Python library to parse Arch .SRCINFO files. Python library to parse Arch .SRCINFO files.
%prep %prep
%setup -q -n srcinfo-%{version} %autosetup -p1 -n srcinfo-%{version}
mv test/__init__.py test_srcinfo.py mv test/__init__.py test_srcinfo.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/parse_srcinfo %python_clone -a %{buildroot}%{_bindir}/parse_srcinfo
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%pytest %pytest
%post %pre
%python_install_alternative parse_srcinfo %python_libalternatives_reset_alternative parse_srcinfo
%postun
%python_uninstall_alternative parse_srcinfo
%files %{python_files} %files %{python_files}
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
%python_alternative %{_bindir}/parse_srcinfo %python_alternative %{_bindir}/parse_srcinfo
%{python_sitelib}/srcinfo*/ %{python_sitelib}/srcinfo
%{python_sitelib}/srcinfo-%{version}.dist-info
%changelog %changelog

26
support-new-poetry.patch Normal file
View File

@@ -0,0 +1,26 @@
Index: srcinfo-0.1.2/pyproject.toml
===================================================================
--- srcinfo-0.1.2.orig/pyproject.toml
+++ srcinfo-0.1.2/pyproject.toml
@@ -1,8 +1,8 @@
-[tool.poetry]
+[project]
name = "srcinfo"
version = "0.1.2"
description = "A small library to parse .SRCINFO files"
-authors = ["Johannes Löthberg <johannes@kyriasis.com>"]
+authors = [{ name = "Johannes Löthberg", email = "johannes@kyriasis.com" }]
license = "ISC"
readme = "README.rst"
@@ -14,8 +14,8 @@ classifiers = [
"License :: OSI Approved :: ISC License (ISCL)",
]
-[tool.poetry.scripts]
-parse_srcinfo = { callable = "srcinfo.main:main" }
+[project.scripts]
+parse_srcinfo = "srcinfo.main:main"
[tool.poetry.dependencies]
python = "^3.7"