commit b43aa2aded7bfaca8d7647e2a0634eee26d6c183f0db5a650a08f15ceaa8a769 Author: Markéta Machová Date: Mon Apr 12 09:59:10 2021 +0000 Accepting request 884607 from home:musfay:python Add ajsonrpc. OBS-URL: https://build.opensuse.org/request/show/884607 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ajsonrpc?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.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 +*.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..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ajsonrpc-1.1.0.tar.gz b/ajsonrpc-1.1.0.tar.gz new file mode 100644 index 0000000..00ae94f --- /dev/null +++ b/ajsonrpc-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a01c2b56d20c59868ed96afbc468e0cd73e29b156e2c02c1ed3365e4e42b9ac +size 21961 diff --git a/python-ajsonrpc.changes b/python-ajsonrpc.changes new file mode 100644 index 0000000..0b3dd7a --- /dev/null +++ b/python-ajsonrpc.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 12 09:51:09 UTC 2021 - Mustafa Çalışkan + +- Run tests only on python38 flavor + +------------------------------------------------------------------- +Sun Apr 4 21:51:53 UTC 2021 - Mustafa Çalışkan + +- Initial version 1.1.0 diff --git a/python-ajsonrpc.spec b/python-ajsonrpc.spec new file mode 100644 index 0000000..faa3816 --- /dev/null +++ b/python-ajsonrpc.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-ajsonrpc +# +# Copyright (c) 2021 SUSE LLC +# +# 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 skip_python2 1 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-ajsonrpc +Version: 1.1.0 +Release: 0 +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-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pytest} +BuildRequires: fdupes +BuildArch: noarch +%python_subpackages + +%description +Async JSON-RPC 2.0 protocol + server powered by asyncio. + +%prep +%setup -q -n ajsonrpc-%{version} + +%build +%python_build + +%install +%python_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 +%if 0%{?suse_version} > 1530 +%__python38 -m unittest -v +%endif + +%post +%python_install_alternative async-json-rpc-server + +%postun +%python_uninstall_alternative async-json-rpc-server + +%files %{python_files} +%doc README.md +%license LICENSE.txt +%python_alternative %{_bindir}/async-json-rpc-server +%{python_sitelib}/* + +%changelog