1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, fetchpatch
6, pytest-mockito
7, pytestCheckHook
8, robotframework
9}:
10
11buildPythonPackage rec {
12 pname = "robotframework-pythonlibcore";
13 version = "4.0.0";
14
15 disabled = pythonOlder "3.7";
16
17 format = "setuptools";
18
19 src = fetchFromGitHub {
20 owner = "robotframework";
21 repo = "PythonLibCore";
22 rev = "v${version}";
23 hash = "sha256-86o5Lh9zWo4vUF2186dN7e8tTUu5PIxM/ZukPwNl0S8=";
24 };
25
26 patches = [
27 (fetchpatch {
28 name = "fix-finding-version.patch";
29 url = "https://github.com/robotframework/PythonLibCore/commit/84c73979e309f59de057ae6a77725ab0f468b71f.patch";
30 hash = "sha256-zrjsNvXpJDLpXql200NV+QGWFLtnRVZTeAjT52dRn2s=";
31 })
32 ];
33
34 checkInputs = [
35 pytest-mockito
36 pytestCheckHook
37 robotframework
38 ];
39
40 preCheck = ''
41 export PYTHONPATH="atest:utest/helpers:$PYTHONPATH"
42 '';
43
44 pythonImportsCheck = [ "robotlibcore" ];
45
46 meta = {
47 changelog = "https://github.com/robotframework/PythonLibCore/blob/${src.rev}/docs/PythonLibCore-${version}.rst";
48 description = "Tools to ease creating larger test libraries for Robot Framework using Python";
49 homepage = "https://github.com/robotframework/PythonLibCore";
50 license = lib.licenses.asl20;
51 maintainers = with lib.maintainers; [ dotlambda ];
52 };
53}