1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 atpublic,
8 psutil,
9 pytest-cov,
10 sybil,
11 pdm-pep517,
12}:
13
14buildPythonPackage rec {
15 pname = "flufl-lock";
16 version = "7.1.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 pname = "flufl.lock";
23 inherit version;
24 hash = "sha256-rxQXKzW7xYaHvQa3DRaT/Y1Iy/D/3n5RphjBSK4kBC0=";
25 };
26
27 nativeBuildInputs = [ pdm-pep517 ];
28 propagatedBuildInputs = [
29 atpublic
30 psutil
31 ];
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-cov
35 sybil
36 ];
37
38 # disable code coverage checks for all OS. Upstream does not enforce these
39 # checks on Darwin, and code coverage cannot be improved downstream nor is it
40 # relevant to the user.
41 pytestFlagsArray = [ "--no-cov" ];
42
43 pythonImportsCheck = [ "flufl.lock" ];
44
45 pythonNamespaces = [ "flufl" ];
46
47 meta = with lib; {
48 homepage = "https://flufllock.readthedocs.io/";
49 description = "NFS-safe file locking with timeouts for POSIX and Windows";
50 changelog = "https://gitlab.com/warsaw/flufl.lock/-/blob/${version}/docs/NEWS.rst";
51 maintainers = with maintainers; [ qyliss ];
52 license = licenses.asl20;
53 };
54}