1{
2 lib,
3 buildPythonPackage,
4 fastnumbers,
5 fetchPypi,
6 glibcLocales,
7 hypothesis,
8 pyicu,
9 pytest-mock,
10 pytestCheckHook,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "natsort";
16 version = "8.4.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-RTEsSg5VB1k9oZPe3QSrsUaSU7YB7K9jRFrYDwoepYE=";
24 };
25
26 propagatedBuildInputs = [
27 fastnumbers
28 pyicu
29 ];
30
31 nativeCheckInputs = [
32 glibcLocales
33 hypothesis
34 pytest-mock
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # timing sensitive test
40 # hypothesis.errors.DeadlineExceeded: Test took 524.23ms, which exceeds the deadline of 200.00ms
41 "test_string_component_transform_factory"
42 ];
43
44 pythonImportsCheck = [ "natsort" ];
45
46 meta = with lib; {
47 description = "Natural sorting for Python";
48 mainProgram = "natsort";
49 homepage = "https://github.com/SethMMorton/natsort";
50 changelog = "https://github.com/SethMMorton/natsort/blob/${version}/CHANGELOG.md";
51 license = licenses.mit;
52 maintainers = [ ];
53 };
54}