nixpkgs/pkgs/development/python-modules/natsort/default.nix

44 lines
808 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, pytest
2018-12-03 09:35:08 +00:00
, pytestcov
, pytest-mock
, hypothesis
, glibcLocales
, pathlib ? null
}:
buildPythonPackage rec {
pname = "natsort";
2019-12-19 19:31:16 +00:00
version = "6.2.0";
checkInputs = [
pytest
2018-12-03 09:35:08 +00:00
pytestcov
pytest-mock
hypothesis
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 ]);
src = fetchPypi {
inherit pname version;
2019-12-19 19:31:16 +00:00
sha256 = "58c6fb2f355117e88a19808394ec1ed30a2ff881bdd2c81c436952caebd30668";
};
# testing based on project's tox.ini
checkPhase = ''
pytest --doctest-modules natsort
pytest
'';
meta = {
description = "Natural sorting for python";
homepage = https://github.com/SethMMorton/natsort;
license = lib.licenses.mit;
};
}