Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / tinycss / default.nix
blobaa537c6a613513e7fb02b5dd20cd6005f6d7cd60
1 { lib
2 , buildPythonPackage
3 , cssutils
4 , cython
5 , fetchPypi
6 , pytestCheckHook
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "tinycss";
12   version = "0.4";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-EjBvtQ5enn6u74S4Au2HdIi6gONcZyhn9UjAkkp2cW4=";
20   };
22   postPatch = ''
23     sed -i "/--cov/d" setup.cfg
24   '';
26   nativeBuildInputs = [
27     cython
28   ];
30   propagatedBuildInputs = [
31     cssutils
32   ];
34   nativeCheckInputs = [
35     pytestCheckHook
36   ];
38   preBuild = ''
39     # Force Cython to re-generate this file. If it is present, Cython will
40     # think it is "up to date" even though it was generated with an older,
41     # incompatible version of Cython. See
42     # https://github.com/Kozea/tinycss/issues/17.
43     rm tinycss/speedups.c
44   '';
46   # Disable Cython tests
47   TINYCSS_SKIP_SPEEDUPS_TESTS = true;
49   pythonImportsCheck = [
50     "tinycss"
51   ];
53   meta = with lib; {
54     description = "Complete yet simple CSS parser for Python";
55     homepage = "https://tinycss.readthedocs.io";
56     changelog = "https://github.com/Kozea/tinycss/releases/tag/v${version}";
57     license = licenses.bsd3;
58     maintainers = with maintainers; [ ];
59   };