1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, pytest 6, pytest-cov 7, pytest-mock 8, hypothesis 9, glibcLocales 10, pathlib ? null 11, isPy3k 12}: 13 14buildPythonPackage rec { 15 pname = "natsort"; 16 version = "7.1.1"; 17 18 checkInputs = [ 19 pytest 20 pytest-cov 21 pytest-mock 22 hypothesis 23 glibcLocales 24 ] 25 # pathlib was made part of standard library in 3.5: 26 ++ (lib.optionals (pythonOlder "3.4") [ pathlib ]); 27 28 src = fetchPypi { 29 inherit pname version; 30 sha256 = "00c603a42365830c4722a2eb7663a25919551217ec09a243d3399fa8dd4ac403"; 31 }; 32 33 # Does not support Python 2 34 disabled = !isPy3k; 35 36 # testing based on project's tox.ini 37 # natsort_keygen has pytest mock issues 38 checkPhase = '' 39 pytest --doctest-modules natsort 40 pytest --ignore=tests/test_natsort_keygen.py 41 ''; 42 43 meta = { 44 description = "Natural sorting for python"; 45 homepage = "https://github.com/SethMMorton/natsort"; 46 license = lib.licenses.mit; 47 }; 48}