Repository navigation
Expand file tree
/
Copy pathpython3-blockbuster.spec
More file actions
72 lines (62 loc) · 2.31 KB
/
Copy pathpython3-blockbuster.spec
File metadata and controls
72 lines (62 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Conditional build:
%bcond_without tests # unit tests
Summary: Utility to detect blocking calls in the async event loop
Summary(pl.UTF-8): Narzędzie do wykrywania blokujących wywołań w pętli zdarzeń asynchronicznych
Name: python3-blockbuster
Version: 1.5.29
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/blockbuster/
Source0: https://files.pythonhosted.org/packages/source/b/blockbuster/blockbuster-%{version}.tar.gz
# Source0-md5: 5ca7fb3048ca5c4767eb2605c40e1f6c
URL: https://pypi.org/project/blockbuster/
BuildRequires: python3-build
BuildRequires: python3-hatchling
BuildRequires: python3-installer
BuildRequires: python3-modules >= 1:3.8
%if %{with tests}
BuildRequires: python3-forbiddenfruit
BuildRequires: python3-pytest >= 8.3.3
BuildRequires: python3-pytest-asyncio >= 0.24.0
BuildRequires: python3-requests >= 2.32.3
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 2.044
Requires: python3-modules >= 1:3.8
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Blockbuster is a Python package designed to detect and prevent
blocking calls within an asynchronous event loop. It is particularly
useful when executing tests to ensure that your asynchronous code does
not inadvertently call blocking operations, which can lead to
performance bottlenecks and unpredictable behavior.
%description -l pl.UTF-8
Blockbuster to pakiet Pythona zaprojektowany, aby wykrywać i
zapobiegać blokującym wywołaniom wewnątrz pętli zdarzeń
asynchronicznych. Jest to przydatne w szczególności przy wykonywaniu
testów, aby upewnić się, że kod asynchroniczny nie wywołuje
nieumyślnie operacji blokujących, co może prowadzić do pogorszenia
wydajności i nieprzewidywanych zachowań.
%prep
%setup -q -n blockbuster-%{version}
%build
%py3_build_pyproject
%if %{with tests}
# disabled tests require networking
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
PYTEST_PLUGINS=pytest_asyncio.plugin \
%{__python3} -m pytest tests -k 'not test_socket_send and not test_socket_send_non_blocking and not test_ssl_socket'
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc README.md
%{py3_sitescriptdir}/blockbuster
%{py3_sitescriptdir}/blockbuster-%{version}.dist-info