Blob Blame History Raw
Name:           python-throttler
Version:        1.2.2
Release:        %autorelease
Summary:        Easy throttling with asyncio support

License:        MIT
# GitHub archive contains tests and examples; PyPI sdist does not
Source:         %{url}/archive/v%{version}/throttler-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
# Run tests in parallel; this speeds up the build quite a bit.
BuildRequires:  python3dist(pytest-xdist)

%global common_description %{expand:
Zero-dependency Python package for easy throttling with asyncio support.}

%description %{common_description}

%package -n python3-throttler
Summary:        %{summary}

%description -n python3-throttler %{common_description}

%autosetup -n throttler-%{version}

sed -r -i 's/^(codecov|flake8|pytest-cov)/# &/' requirements-dev.txt

%pyproject_buildrequires -x dev


%pyproject_save_files -l throttler

%pytest -n auto -v

%files -n python3-throttler -f %{pyproject_files}
%doc examples/