1{ stdenv 2, lib 3, buildPythonPackage 4, click 5, fetchFromGitHub 6, mock 7, prompt-toolkit 8, ptable 9, pygments 10, pytestCheckHook 11, pythonOlder 12, requests 13, sphinx 14, testtools 15, tkinter 16, urllib3 17, prettytable 18, rich 19, zeep 20}: 21 22buildPythonPackage rec { 23 pname = "softlayer"; 24 version = "6.1.0"; 25 disabled = pythonOlder "3.5"; 26 27 src = fetchFromGitHub { 28 owner = pname; 29 repo = "softlayer-python"; 30 rev = "v${version}"; 31 sha256 = "sha256-T49KVAsgcAZySkaJi47IrFcMHGZvEkGDjPWsdMarzwM="; 32 }; 33 34 postPatch = '' 35 substituteInPlace setup.py \ 36 --replace 'rich == 12.3.0' 'rich >= 12.3.0' 37 ''; 38 39 propagatedBuildInputs = [ 40 click 41 prompt-toolkit 42 ptable 43 pygments 44 requests 45 urllib3 46 prettytable 47 rich 48 ]; 49 50 checkInputs = [ 51 mock 52 pytestCheckHook 53 sphinx 54 testtools 55 tkinter 56 zeep 57 ]; 58 59 # Otherwise soap_tests.py will fail to create directory 60 # Permission denied: '/homeless-shelter' 61 preCheck = '' 62 export HOME=$(mktemp -d) 63 ''; 64 65 disabledTestPaths = [ 66 # Test fails with ConnectionError trying to connect to api.softlayer.com 67 "tests/transports/soap_tests.py" 68 ]; 69 70 pythonImportsCheck = [ "SoftLayer" ]; 71 72 meta = with lib; { 73 description = "Python libraries that assist in calling the SoftLayer API"; 74 homepage = "https://github.com/softlayer/softlayer-python"; 75 license = licenses.mit; 76 maintainers = with maintainers; [ onny ]; 77 }; 78}