pythonPackages.natsort: 5.0.1 -> 5.0.3

* pythonPackages.natsort: refactor config

* pythonPackages.natsort: 5.0.1 -> 5.0.3

* pythonPackages.natsort: fix broken
This commit is contained in:
Jaakko Luttinen
2017-05-14 21:05:50 +03:00
committed by Frederik Rietdijk
parent 2a6edacc4e
commit 8a68e4c7f6
3 changed files with 75 additions and 28 deletions

View File

@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, hypothesis
, pytestcache
, pytestcov
, pytestflakes
, pytestpep8
, pytest
, glibcLocales
, mock ? null
, pathlib ? null
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "natsort";
version = "5.0.3";
buildInputs = [
hypothesis
pytestcache
pytestcov
pytestflakes
pytestpep8
pytest
glibcLocales
]
# pathlib was made part of standard library in 3.5:
++ (lib.optionals (pythonOlder "3.4") [ pathlib ])
# based on testing-requirements.txt:
++ (lib.optionals (pythonOlder "3.3") [ mock ]);
src = fetchPypi {
inherit pname version;
sha256 = "1h87n0jcsi6mgjx1pws6g1lmcn8jwabwxj8hq334jvziaq0plyym";
};
# do not run checks on nix_run_setup.py
patches = [ ./setup.patch ];
# testing based on project's tox.ini
checkPhase = ''
pytest --doctest-modules natsort
pytest --flakes --pep8 --cov natsort --cov-report term-missing
'';
meta = {
description = "Natural sorting for python";
homepage = https://github.com/SethMMorton/natsort;
license = lib.licenses.mit;
};
}