diff --git a/python-srcinfo.changes b/python-srcinfo.changes index 3aedb61..2ef5a7a 100644 --- a/python-srcinfo.changes +++ b/python-srcinfo.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 16 02:53:21 UTC 2025 - Steve Kowalik + +- 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á diff --git a/python-srcinfo.spec b/python-srcinfo.spec index 17a8348..6dc5e83 100644 --- a/python-srcinfo.spec +++ b/python-srcinfo.spec @@ -22,10 +22,12 @@ Version: 0.1.2 Release: 0 Summary: Python library to parse Arch SRCINFO files 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 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: python-rpm-macros @@ -42,14 +44,14 @@ BuildRequires: %{python_module pytest} Python library to parse Arch .SRCINFO files. %prep -%setup -q -n srcinfo-%{version} +%autosetup -p1 -n srcinfo-%{version} 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} @@ -63,6 +65,7 @@ mv test/__init__.py test_srcinfo.py %doc README.rst %license LICENSE %python_alternative %{_bindir}/parse_srcinfo -%{python_sitelib}/srcinfo*/ +%{python_sitelib}/srcinfo +%{python_sitelib}/srcinfo-%{version}.dist-info %changelog diff --git a/support-new-poetry.patch b/support-new-poetry.patch new file mode 100644 index 0000000..864a443 --- /dev/null +++ b/support-new-poetry.patch @@ -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 "] ++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"