From 0d8e2ba470c7288380ef017e8293f2ee9ee7c42dc36b4b1407097dafc3323e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 13 May 2025 15:12:04 +0000 Subject: [PATCH] Accepting request 1277146 from home:mcalabkova:branches:devel:languages:python - Convert to pip-based build OBS-URL: https://build.opensuse.org/request/show/1277146 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ajsonrpc?expand=0&rev=6 --- python-ajsonrpc.changes | 5 +++++ python-ajsonrpc.spec | 19 ++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/python-ajsonrpc.changes b/python-ajsonrpc.changes index 72d828e..b474d44 100644 --- a/python-ajsonrpc.changes +++ b/python-ajsonrpc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 13 13:05:55 UTC 2025 - Markéta Machová + +- Convert to pip-based build + ------------------------------------------------------------------- Wed Jan 25 09:40:02 UTC 2023 - Daniel Garcia diff --git a/python-ajsonrpc.spec b/python-ajsonrpc.spec index be04570..22ac2a8 100644 --- a/python-ajsonrpc.spec +++ b/python-ajsonrpc.spec @@ -1,7 +1,7 @@ # # spec file for package python-ajsonrpc # -# 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,7 +16,6 @@ # -%define skip_python2 1 Name: python-ajsonrpc Version: 1.2.0 Release: 0 @@ -24,8 +23,10 @@ Summary: Async JSON-RPC 20 protocol + server powered by asyncio License: MIT URL: https://github.com/pavlov99/ajsonrpc Source: https://files.pythonhosted.org/packages/source/a/ajsonrpc/ajsonrpc-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -38,23 +39,15 @@ Async JSON-RPC 2.0 protocol + server powered by asyncio. %setup -q -n ajsonrpc-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/async-json-rpc-server %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# 1 test fails on python 3.6 -# See https://github.com/pavlov99/ajsonrpc/issues/19 -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -if [ %{$python_version} != "3.6" ] -then - rm -rf _build* - $python -m pytest -v -fi -} +%pytest %post %python_install_alternative async-json-rpc-server