371ff18
Name:           python-matrix-nio
Packit 6ef3a6a
Version:        0.22.1
371ff18
Release:        %autorelease
6999565
Summary:        A Matrix client library
6999565
3413243
# ASL:
3413243
# matrix_nio-0.21.2//nio/crypto/attachments.py: Apache License 2.0
3413243
# matrix_nio-0.21.2//nio/crypto/key_export.py: Apache License 2.0
3413243
# matrix_nio-0.21.2//nio/store/database.py: Apache License 2.0
3413243
# matrix_nio-0.21.2//nio/store/models.py: Apache License 2.0
3413243
3413243
# All other files: ISC
3413243
3413243
License:        ISC and Apache-2.0
371ff18
URL:            https://pypi.python.org/pypi/matrix-nio
fc9e5e2
Source0:        %{pypi_source matrix_nio}
6999565
6999565
BuildArch:      noarch
6999565
6999565
%global _description %{expand:
6999565
nio is a multilayered Matrix client library. The underlying base layer doesn't
6999565
do any network IO on its own, but on top of that is a full fledged
6999565
batteries-included asyncio layer using aiohttp. File IO is only done if you
6999565
enable end-to-end encryption (E2EE).}
6999565
6999565
%description %_description
6999565
371ff18
%package -n python3-matrix-nio
6999565
Summary:        %{summary}
6999565
BuildRequires:  python3-devel
03136a9
BuildRequires:  python3-toml
c91867b
BuildRequires:  python3-logbook
6999565
371ff18
%description -n python3-matrix-nio %_description
6999565
6999565
%prep
fc9e5e2
%autosetup -n matrix_nio-%{version}
6999565
# Update BRs
c4119ba
sed \
03136a9
    -e 's/^aiohttp-socks.*/aiohttp-socks = "*"/' \
03136a9
    -e 's/^aiofiles.*/aiofiles = "*"/' \
03136a9
    -e 's/^cachetools.*/cachetools = "*"/' \
03136a9
    -e 's/^h11.*/h11 = "*"/' \
03136a9
    -e 's/^h2.*/h2 = "*"/' \
03136a9
    -e 's/^pycryptodome.*/pycryptodomex = "*"/' \
63eb658
    -e 's/^jsonschema.*/jsonschema = "*"/' \
c4119ba
    -i pyproject.toml
d73fc58
# Remove backup file
d73fc58
rm -fv nio/events/room_events.py.orig
d73fc58
a843fa5
# use cryptodomex instead of crypto
a843fa5
# https://bugzilla.redhat.com/show_bug.cgi?id=2061832
a843fa5
find . -name "*.py" -exec sed -i 's/^from Crypto/from Cryptodome/'  '{}' \;
a843fa5
d73fc58
d73fc58
%generate_buildrequires
d73fc58
%pyproject_buildrequires -x e2e
6999565
6999565
%build
6999565
%pyproject_wheel
6999565
6999565
6999565
%install
6999565
%pyproject_install
d73fc58
%pyproject_save_files nio
6999565
6999565
%check
03136a9
%pyproject_check_import
6999565
a843fa5
%files -n python3-matrix-nio  -f %{pyproject_files}
6999565
%license LICENSE.md
6999565
%doc README.md
6999565
6999565
%changelog
371ff18
%autochangelog