Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / ubelt / default.nix
bloba85be00ddf799ee1484e82c70f7b259b64a39296
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
6 , setuptools
7 , wheel
8 , numpy
9 , python-dateutil
10 , xxhash
11 , pytestCheckHook
12 , requests
13 , xdoctest
16 buildPythonPackage rec {
17   pname = "ubelt";
18   version = "1.3.4";
19   pyproject = true;
21   disabled = pythonOlder "3.6";
23   src = fetchFromGitHub {
24     owner = "Erotemic";
25     repo = "ubelt";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-pvCmmdPRLupMUCiOvfa+JTX8NPFZ/UcXSPEaaDG3eTk=";
28   };
30   nativeBuildInputs = [
31     setuptools
32     wheel
33   ];
35   passthru.optional-dependencies = {
36     optional = [
37       numpy
38       python-dateutil
39       xxhash
40     ];
41   };
43   nativeCheckInputs = [
44     pytestCheckHook
45     requests
46     xdoctest
47   ];
49   preCheck = ''
50     export HOME=$TMPDIR
51   '';
53   disabledTests = lib.optionals stdenv.isDarwin [
54     # fail due to sandbox environment
55     "CacheStamp.expired"
56     "userhome"
57   ];
59   pythonImportsCheck = [ "ubelt" ];
61   __darwinAllowLocalNetworking = true;
63   meta = with lib; {
64     description = "A Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy";
65     homepage = "https://github.com/Erotemic/ubelt";
66     changelog = "https://github.com/Erotemic/ubelt/blob/${src.rev}/CHANGELOG.md";
67     license = licenses.asl20;
68     maintainers = with maintainers; [ natsukium ];
69   };