2017-05-14 18:05:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2018-12-03 09:35:08 +00:00
|
|
|
, pytestcov
|
|
|
|
, pytest-mock
|
|
|
|
, hypothesis
|
2017-05-14 18:05:50 +00:00
|
|
|
, glibcLocales
|
|
|
|
, pathlib ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "natsort";
|
2019-02-14 07:37:21 +00:00
|
|
|
version = "6.0.0";
|
2017-05-14 18:05:50 +00:00
|
|
|
|
2018-02-20 20:34:44 +00:00
|
|
|
checkInputs = [
|
2017-05-14 18:05:50 +00:00
|
|
|
pytest
|
2018-12-03 09:35:08 +00:00
|
|
|
pytestcov
|
|
|
|
pytest-mock
|
|
|
|
hypothesis
|
2017-05-14 18:05:50 +00:00
|
|
|
glibcLocales
|
|
|
|
]
|
|
|
|
# pathlib was made part of standard library in 3.5:
|
2018-12-03 09:35:08 +00:00
|
|
|
++ (lib.optionals (pythonOlder "3.4") [ pathlib ]);
|
2017-05-14 18:05:50 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:21 +00:00
|
|
|
sha256 = "ff3effb5618232866de8d26e5af4081a4daa9bb0dfed49ac65170e28e45f2776";
|
2017-05-14 18:05:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# testing based on project's tox.ini
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --doctest-modules natsort
|
2018-08-30 20:29:31 +00:00
|
|
|
pytest
|
2017-05-14 18:05:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Natural sorting for python";
|
|
|
|
homepage = https://github.com/SethMMorton/natsort;
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|