git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.loguru: unbreak (#117381)
commit0df63c954347ba5f85be869b5957587cccc2b4e7 authorRobert T. McGibbon <rmcgibbo@gmail.com> dateTue 23 Mar 2021, 18:49 (6 years ago) parent76552e9
1 file changed+22−5
pkgs/development/python-modules/loguru/default.nix+22−5
pkgs/development/python-modules/loguru/default.nix+22−5
@@ -1,19 +1,36 @@
1−{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, colorama, pytestCheckHook }:
1+{ lib
2+, stdenv
3+, buildPythonPackage
4+, fetchPypi
5+, fetchpatch
6+, isPy27
7+, colorama
8+, pytestCheckHook
9+, pythonAtLeast
10+}:
211
312buildPythonPackage rec {
413 pname = "loguru";
514 version = "0.5.3";
615
7− disabled = isPy27;
16+ # python3.9 compatibility should be in the next release after 0.5.3
17+ disabled = isPy27 || pythonAtLeast "3.9";
818 src = fetchPypi {
919 inherit pname version;
1020 sha256 = "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319";
1121 };
1222
13− checkInputs = [ pytestCheckHook colorama ];
23+ patches = [
24+ # Fixes tests with pytest>=6.2.2. Will be part of the next release after 0.5.3
25+ (fetchpatch {
26+ url = "https://github.com/Delgan/loguru/commit/31cf758ee9d22dbfa125f38153782fe20ac9dce5.patch";
27+ sha256 = "1lzbs8akg1s7s6xjl3samf4c4bpssqvwg5fn3mwlm4ysr7jd5y67";
28+ })
29+ ];
1430
15− pytestFlagsArray = lib.optionals stdenv.isDarwin [ "--ignore=tests/test_multiprocessing.py" ];
31+ checkInputs = [ pytestCheckHook colorama ];
1632
33+ disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ];
1734 disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ]
1835 ++ lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ];
1936
@@ -21,6 +38,6 @@ buildPythonPackage rec {
2138 homepage = "https://github.com/Delgan/loguru";
2239 description = "Python logging made (stupidly) simple";
2340 license = licenses.mit;
24− maintainers = with maintainers; [ jakewaksbaum ];
41+ maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
2542 };
2643}