at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, dataclasses 4, fetchPypi 5, fetchpatch 6, google-cloud-storage 7, mock 8, pytestCheckHook 9, pythonOlder 10, smart-open 11, typer 12}: 13 14buildPythonPackage rec { 15 pname = "pathy"; 16 version = "0.6.1"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchPypi { 22 inherit pname version; 23 sha256 = "838624441f799a06b446a657e4ecc9ebc3fdd05234397e044a7c87e8f6e76b1c"; 24 }; 25 26 propagatedBuildInputs = [ 27 smart-open 28 typer 29 google-cloud-storage 30 ] ++ lib.optionals (pythonOlder "3.7") [ 31 dataclasses 32 ]; 33 34 checkInputs = [ 35 mock 36 pytestCheckHook 37 ]; 38 39 patches = [ 40 # Support for smart-open >= 6.0.0, https://github.com/justindujardin/pathy/pull/71 41 (fetchpatch { 42 name = "support-later-smart-open.patch"; 43 url = "https://github.com/justindujardin/pathy/commit/ba1c23df6ee5d1e57bdfe845ff6a9315cba3df6a.patch"; 44 sha256 = "sha256-V1i4tx73Xkdqb/wZhQIv4p6FVpF9SEfDhlBkwaaRE3w="; 45 }) 46 ]; 47 48 disabledTestPaths = [ 49 # Exclude tests that require provider credentials 50 "pathy/_tests/test_clients.py" 51 "pathy/_tests/test_gcs.py" 52 "pathy/_tests/test_s3.py" 53 ]; 54 55 pythonImportsCheck = [ 56 "pathy" 57 ]; 58 59 meta = with lib; { 60 description = "A Path interface for local and cloud bucket storage"; 61 homepage = "https://github.com/justindujardin/pathy"; 62 license = licenses.asl20; 63 maintainers = with maintainers; [ melling ]; 64 }; 65}