nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 # python39: importlib_resources -> importlib.resources. This patch will be included
30 # in the next release after 5.1.0.
31 (fetchpatch {
32 url = "https://github.com/enthought/apptools/commit/0ae4f52f19a8c0ca9d7926e17c7de949097f24b4.patch";
33 sha256 = "165aiwjisr5c3lasg7xblcha7y1y5bq23vi3g9gc80c24bzwcbsw";
34 })
35 ];
36
37 propagatedBuildInputs = [
38 configobj
39 traits
40 traitsui
41 ] ++ lib.optionals (pythonOlder "3.9") [
42 importlib-resources
43 ];
44
45 checkInputs = [
46 tables
47 pandas
48 pytestCheckHook
49 ];
50
51 preCheck = ''
52 export HOME=$TMP
53 '';
54
55 disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [
56 # https://github.com/enthought/apptools/issues/303
57 "apptools/io/h5/tests/test_dict_node.py"
58 "apptools/io/h5/tests/test_file.py"
59 "apptools/io/h5/tests/test_table_node.py"
60 ];
61
62
63 pythonImportsCheck = [
64 "apptools"
65 ];
66
67 meta = with lib; {
68 description = "Set of packages that Enthought has found useful in creating a number of applications";
69 homepage = "https://github.com/enthought/apptools";
70 license = licenses.bsdOriginal;
71 maintainers = with maintainers; [ knedlsepp ];
72 };
73}