1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, blessed
6, prefixed
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "enlighten";
13 version = "1.12.2";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-jAn2VxEZdGzuZ3bL9OfASkjoiPTMrm2zd6WHZ0HwiZ8=";
21 };
22
23 propagatedBuildInputs = [
24 blessed
25 prefixed
26 ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 ];
31
32 pythonImportsCheck = [
33 "enlighten"
34 ];
35
36 disabledTests = [
37 # AssertionError: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> is not...
38 "test_init"
39 # AssertionError: Invalid format specifier (deprecated since prefixed 0.4.0)
40 "test_floats_prefixed"
41 "test_subcounter_prefixed"
42 ] ++ lib.optionals stdenv.isDarwin [
43 # https://github.com/Rockhopper-Technologies/enlighten/issues/44
44 "test_autorefresh"
45 ];
46
47 meta = with lib; {
48 description = "Enlighten Progress Bar for Python Console Apps";
49 homepage = "https://github.com/Rockhopper-Technologies/enlighten";
50 changelog = "https://github.com/Rockhopper-Technologies/enlighten/releases/tag/${version}";
51 license = with licenses; [ mpl20 ];
52 maintainers = with maintainers; [ veprbl ];
53 };
54}