python3.pkgs.fabulous: init at 0.3.0

This commit is contained in:
Symphorien Gibol 2020-10-31 12:00:00 +00:00
parent 0cf43ed2a0
commit f269e315ec
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pillow
, python
}:
buildPythonPackage rec {
pname = "fabulous";
version = "0.3.0";
src = fetchFromGitHub {
owner = "jart";
repo = pname;
rev = version;
sha256 = "0yxdaz6yayp1a57kdb2i8q7kwwdlwy4a3d0lr012h2ji9m89c8q7";
};
patches = [
./relative_import.patch
];
propagatedBuildInputs = [
pillow
];
checkPhase = ''
for i in tests/*.py; do
${python.interpreter} $i
done
'';
meta = with lib; {
description = "Make the output of terminal applications look fabulous";
homepage = "https://jart.github.io/fabulous";
license = licenses.asl20;
maintainers = [ maintainers.symphorien ];
};
}

View File

@ -0,0 +1,27 @@
diff --git a/fabulous/prompt.py b/fabulous/prompt.py
index 531176f..e395ab4 100644
--- a/fabulous/prompt.py
+++ b/fabulous/prompt.py
@@ -18,8 +18,7 @@
import sys
import os
import os.path
-import term
-from term import stdout, stderr, display
+from .term import stdout, stderr, display
__all__ = ["input_object","query","file_chooser"]
diff --git a/fabulous/widget.py b/fabulous/widget.py
index 31a2547..7ad889a 100644
--- a/fabulous/widget.py
+++ b/fabulous/widget.py
@@ -24,7 +24,7 @@ import os
import math
from datetime import datetime
# import textwrap
-from term import stdout, display
+from .term import stdout, display
class ProgressBar(object):
"""A 3-line progress bar, which looks like::

View File

@ -1970,6 +1970,8 @@ in {
Fabric = callPackage ../development/python-modules/Fabric { };
fabulous = callPackage ../development/python-modules/fabulous { };
facebook-sdk = callPackage ../development/python-modules/facebook-sdk { };
face = callPackage ../development/python-modules/face { };