1{
2 lib,
3 buildPythonPackage,
4 cython,
5 expandvars,
6 fetchFromGitHub,
7 pytest-codspeed,
8 pytest-cov-stub,
9 pytest-xdist,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "propcache";
17 version = "0.3.2";
18 pyproject = true;
19
20 disabled = pythonOlder "3.11";
21
22 src = fetchFromGitHub {
23 owner = "aio-libs";
24 repo = "propcache";
25 tag = "v${version}";
26 hash = "sha256-G8SLIZaJUu3uwyFicrQF+PjKp3vsUh/pNUsmDpnnAAg=";
27 };
28
29 postPatch = ''
30 substituteInPlace packaging/pep517_backend/_backend.py \
31 --replace "Cython ~= 3.0.12" Cython
32 '';
33
34 build-system = [
35 cython
36 expandvars
37 setuptools
38 ];
39
40 nativeCheckInputs = [
41 pytest-codspeed
42 pytest-cov-stub
43 pytest-xdist
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [ "propcache" ];
48
49 meta = {
50 description = "Fast property caching";
51 homepage = "https://github.com/aio-libs/propcache";
52 changelog = "https://github.com/aio-libs/propcache/blob/${src.tag}/CHANGES.rst";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ fab ];
55 };
56}