1{ lib
2, buildPythonPackage
3, cython
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "frozenlist";
11 version = "1.3.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "aio-libs";
18 repo = pname;
19 rev = "v${version}";
20 hash = "sha256-nOzS004uduS5C8y4ig0IaYyfk+h94uTiN048X66HO+Q=";
21 };
22
23 nativeBuildInputs = [
24 cython
25 ];
26
27 checkInputs = [
28 pytestCheckHook
29 ];
30
31 postPatch = ''
32 substituteInPlace pytest.ini \
33 --replace "--cov=frozenlist" ""
34 '';
35
36 preBuild = ''
37 cython frozenlist/_frozenlist.pyx
38 '';
39
40 pythonImportsCheck = [
41 "frozenlist"
42 ];
43
44 meta = with lib; {
45 description = "Python module for list-like structure";
46 homepage = "https://github.com/aio-libs/frozenlist";
47 license = with licenses; [ asl20 ];
48 maintainers = with maintainers; [ fab ];
49 };
50}