From f1b3901229afc94cece13660b97673fd124d1bc7 Mon Sep 17 00:00:00 2001 From: tuibuilder_pel7x64builder0 Date: Sun, 7 Feb 2021 00:48:15 +0100 Subject: [PATCH] python-matrix-nio package creation Signed-off-by: tuibuilder_pel7x64builder0 --- SPECS/python-matrix-nio.spec | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 SPECS/python-matrix-nio.spec diff --git a/SPECS/python-matrix-nio.spec b/SPECS/python-matrix-nio.spec new file mode 100644 index 0000000..99c19ed --- /dev/null +++ b/SPECS/python-matrix-nio.spec @@ -0,0 +1,60 @@ +%global srcname matrix-nio + +Name: python-%{srcname} +Version: 0.16.0 +Release: 1%{?dist} +Summary: A Matrix client library +License: ISC and ASL 2.0 +URL: https://pypi.python.org/pypi/%{srcname} +Source0: https://files.pythonhosted.org/packages/e4/79/2b923e4d269eba22d5de348cdce587be5603f187d84f5076515fc0819a83/matrix-nio-0.16.0.tar.gz +BuildArch: noarch + + +%global _description %{expand: +nio is a multilayered Matrix client library. The underlying base layer doesn't +do any network IO on its own, but on top of that is a full fledged +batteries-included asyncio layer using aiohttp. File IO is only done if you +enable end-to-end encryption (E2EE).} +%description %_description + + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%description -n python3-%{srcname} %_description + + +%prep +%autosetup -n %{srcname}-%{version} +# Remove backup file +rm -vf nio/events/room_events.py.orig +# Update BRs +sed \ + -e 's/aiofiles.*/aiofiles = "*"/' \ + -e 's/h11.*/h11 = "*"/' \ + -e 's/h2.*/h2 = "*"/' \ + -e 's/pycryptodome.*/pycryptodomex = "*"/' \ + -i pyproject.toml + + +%build +%{__python3} setup.py build + + +%install +%{__python3} setup.py install --optimize 2 --root %{buildroot} + + +%check + + +# Note that there is no %%files section for the unversioned python module +%files -n python3-%{srcname} +%license LICENSE.md +%doc README.md +%{python3_sitelib}/matrix_nio-*.egg-info/ +%{python3_sitelib}/nio/ + + +%changelog