linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / tinycss2 / default.nix
blob35c0f76b08434e2d50bb21756a05bea1b8d9dbe6
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchPypi
5 , fetchpatch
6 , webencodings
7 # Check inputs
8 , pytest
9 , pytestrunner
10 , pytestcov
11 , pytest-flake8
12 , pytest-isort
15 buildPythonPackage rec {
16   pname = "tinycss2";
17   version = "1.0.2";
18   disabled = pythonOlder "3.5";
20   src = fetchPypi {
21     inherit pname version;
22     sha256 = "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4";
23   };
25   patches = [
26     (
27       fetchpatch {
28         name = "tinycss2-fix-pytest-flake8-fail.patch";
29         url = "https://github.com/Kozea/tinycss2/commit/6556604fb98c2153412384d6f0f705db2da1aa60.patch";
30         sha256 = "1srvdzg1bak65fawd611rlskcgn5abmwmyjnk8qrrrasr554bc59";
31       }
32     )
33   ];
35   propagatedBuildInputs = [ webencodings ];
37   checkInputs = [ pytest pytestrunner pytestcov pytest-flake8 pytest-isort ];
39   # https://github.com/PyCQA/pycodestyle/issues/598
40   preCheck = ''
41     printf "[flake8]\nignore=W504,E741,E126" >> setup.cfg
42   '';
44   meta = with lib; {
45     description = "Low-level CSS parser for Python";
46     homepage = "https://github.com/Kozea/tinycss2";
47     license = licenses.bsd3;
48   };