1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # build-system
8 setuptools,
9 setuptools-scm,
10
11 # dependencies
12 redis,
13
14 # tests
15 pygments,
16 pytest-cov-stub,
17 pytest-rerunfailures,
18 pytest-timeout,
19 pytestCheckHook,
20}:
21
22buildPythonPackage rec {
23 pname = "portalocker";
24 version = "3.2.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.7";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-HzAClWpUqMNzBYbFx3vxj65BSeB+rxwp/D+vTVo/iaw=";
32 };
33
34 nativeBuildInputs = [
35 setuptools
36 setuptools-scm
37 ];
38
39 propagatedBuildInputs = [ redis ];
40
41 nativeCheckInputs = [
42 pygments
43 pytest-cov-stub
44 pytest-rerunfailures
45 pytest-timeout
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [ "portalocker" ];
50
51 meta = with lib; {
52 changelog = "https://github.com/wolph/portalocker/releases/tag/v${version}";
53 description = "Library to provide an easy API to file locking";
54 homepage = "https://github.com/WoLpH/portalocker";
55 license = licenses.psfl;
56 maintainers = [ ];
57 };
58}