at master 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pythonOlder, 7 setuptools, 8 wheel, 9 numpy, 10 python-dateutil, 11 xxhash, 12 pytestCheckHook, 13 requests, 14 xdoctest, 15}: 16 17buildPythonPackage rec { 18 pname = "ubelt"; 19 version = "1.4.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "Erotemic"; 26 repo = "ubelt"; 27 tag = "v${version}"; 28 hash = "sha256-9f22hNi/YrxAVoEOGojdziogUN/YNCrpUuOfib9nqfQ="; 29 }; 30 31 nativeBuildInputs = [ 32 setuptools 33 wheel 34 ]; 35 36 optional-dependencies = { 37 optional = [ 38 numpy 39 python-dateutil 40 xxhash 41 ]; 42 }; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 requests 47 xdoctest 48 ]; 49 50 preCheck = '' 51 export HOME=$TMPDIR 52 ''; 53 54 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ 55 # fail due to sandbox environment 56 "CacheStamp.expired" 57 "userhome" 58 ]; 59 60 pythonImportsCheck = [ "ubelt" ]; 61 62 __darwinAllowLocalNetworking = true; 63 64 meta = with lib; { 65 description = "Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy"; 66 homepage = "https://github.com/Erotemic/ubelt"; 67 changelog = "https://github.com/Erotemic/ubelt/blob/${src.rev}/CHANGELOG.md"; 68 license = licenses.asl20; 69 maintainers = with maintainers; [ natsukium ]; 70 }; 71}