1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5 6# build 7, setuptools 8, setuptools-git-versioning 9, setuptools-scm 10 11# propagates 12, azure-storage-blob 13, boto3 14, requests 15 16# tests 17, responses 18, unittestCheckHook 19}: 20buildPythonPackage rec { 21 pname = "sapi-python-client"; 22 version = "0.7.1"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "keboola"; 29 repo = pname; 30 rev = "refs/tags/${version}"; 31 hash = "sha256-74sChw6eMkBtfHV6hiaaLNOr/J0Sa73LB93Z8muLaiI="; 32 }; 33 34 SETUPTOOLS_SCM_PRETEND_VERSION = version; 35 36 nativeBuildInputs = [ 37 setuptools 38 setuptools-git-versioning 39 setuptools-scm 40 ]; 41 42 propagatedBuildInputs = [ 43 azure-storage-blob 44 boto3 45 requests 46 ]; 47 48 # Requires API token and an active Keboola bucket 49 # ValueError: Root URL is required. 50 doCheck = false; 51 52 nativeCheckInputs = [ 53 unittestCheckHook 54 responses 55 ]; 56 57 pythonImportsCheck = [ 58 "kbcstorage" 59 "kbcstorage.buckets" 60 "kbcstorage.client" 61 "kbcstorage.tables" 62 ]; 63 64 meta = with lib; { 65 description = "Keboola Connection Storage API client"; 66 homepage = "https://github.com/keboola/sapi-python-client"; 67 changelog = "https://github.com/keboola/sapi-python-client/releases/tag/${version}"; 68 license = licenses.mit; 69 maintainers = with maintainers; [ mrmebelman ]; 70 }; 71}