biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / flask-compress / default.nix
blob130c767c39f46bba8a9f4bbf3e06c75efbdd8f6f
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   isPyPy,
6   setuptools,
7   setuptools-scm,
8   flask,
9   zstandard,
10   brotli,
11   brotlicffi,
12   pytestCheckHook,
15 buildPythonPackage rec {
16   version = "1.15";
17   pname = "flask-compress";
18   pyproject = true;
20   src = fetchFromGitHub {
21     owner = "colour-science";
22     repo = "flask-compress";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-J7d/OIUsDWM6DoXS0P4EOE3k6txXKm6m4Yq/EJk6FRE=";
25   };
27   build-system = [
28     setuptools
29     setuptools-scm
30   ];
32   dependencies = [
33     flask
34     zstandard
35   ] ++ lib.optionals (!isPyPy) [ brotli ] ++ lib.optionals isPyPy [ brotlicffi ];
37   nativeCheckInputs = [ pytestCheckHook ];
39   pythonImportsCheck = [ "flask_compress" ];
41   postPatch = ''
42     substituteInPlace pyproject.toml \
43       --replace-fail "setuptools_scm[toml]<8" "setuptools_scm"
44   '';
46   meta = {
47     description = "Compress responses in your Flask app with gzip, deflate or brotli";
48     homepage = "https://github.com/colour-science/flask-compress";
49     changelog = "https://github.com/colour-science/flask-compress/blob/v${version}/CHANGELOG.md";
50     license = lib.licenses.mit;
51     maintainers = with lib.maintainers; [ nickcao ];
52   };