1{ lib 2, buildPythonPackage 3, configobj 4, fetchpatch 5, fetchPypi 6, importlib-resources 7, pandas 8, pytestCheckHook 9, pythonAtLeast 10, pythonOlder 11, tables 12, traits 13, traitsui 14}: 15 16buildPythonPackage rec { 17 pname = "apptools"; 18 version = "5.1.0"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 inherit pname version; 25 sha256 = "12x5lcs1cllpybz7f0i1lcwvmqsaa5n818wb2165lj049wqxx4yh"; 26 }; 27 28 patches = [ 29 # python310: Fix tests 30 # https://github.com/enthought/apptools/issues/303 31 (fetchpatch { 32 url = "https://github.com/enthought/apptools/commit/10fb73916124f7ae7edf6c6688a05ad95678488f.patch"; 33 sha256 = "sha256-izAcP5RWobLvnk2PQx31SX/TUGkw+prbYbjamYVmtjY="; 34 name = "fix_python310_tests.patch"; 35 }) 36 37 # python39: importlib_resources -> importlib.resources. This patch will be included 38 # in the next release after 5.1.0. 39 (fetchpatch { 40 url = "https://github.com/enthought/apptools/commit/0ae4f52f19a8c0ca9d7926e17c7de949097f24b4.patch"; 41 sha256 = "165aiwjisr5c3lasg7xblcha7y1y5bq23vi3g9gc80c24bzwcbsw"; 42 name = "fix_importlib-resources_naming.patch"; 43 }) 44 ]; 45 46 propagatedBuildInputs = [ 47 configobj 48 traits 49 traitsui 50 ] ++ lib.optionals (pythonOlder "3.9") [ 51 importlib-resources 52 ]; 53 54 checkInputs = [ 55 tables 56 pandas 57 pytestCheckHook 58 ]; 59 60 preCheck = '' 61 export HOME=$TMP 62 ''; 63 64 pythonImportsCheck = [ 65 "apptools" 66 ]; 67 68 meta = with lib; { 69 description = "Set of packages that Enthought has found useful in creating a number of applications"; 70 homepage = "https://github.com/enthought/apptools"; 71 license = licenses.bsdOriginal; 72 maintainers = with maintainers; [ knedlsepp ]; 73 }; 74}