Blob Blame History Raw
%global pypi_name flask-compress
%global forgeurl

%bcond tests 1

%global _description %{expand:
Flask-Compress allows you to easily compress your Flask application's
responses with gzip.

The preferred solution is to have a server (like Nginx) automatically
compress the static files for you. If you don't have that option
Flask-Compress will solve the problem for you.}

Name:           python-%{pypi_name}
Version:        1.14
Release:        %autorelease
Summary:        Compress responses in your Flask app with gzip or brotli
License:        MIT
URL:            %forgeurl
Source0:        %forgesource

BuildArch:      noarch

BuildRequires:  make
BuildRequires:  python3-devel

%if %{with tests}
BuildRequires:  python3dist(pytest)

%description %_description

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

Requires:       python3dist(brotli)
Requires:       python3dist(flask)
%description -n python3-%{pypi_name} %_description

%forgeautosetup -p1
rm -rf %{pypi_name}.egg-info

%pyproject_buildrequires -r


%pyproject_save_files flask_compress

%if %{with tests}
# Skip tests requiring network
%pytest -v -k 'not UrlTests'

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE.txt