2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
# build
|
|
|
|
, setuptools-scm
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
, azure-storage-blob
|
|
|
|
, boto3
|
|
|
|
, requests
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, responses
|
2022-09-09 14:08:57 +00:00
|
|
|
, unittestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "sapi-python-client";
|
|
|
|
version = "0.5.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keboola";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-79v9quhzeNRXcm6Z7BhD76lTZtw+Z0T1yK3zhrdreXw=";
|
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
azure-storage-blob
|
|
|
|
boto3
|
|
|
|
requests
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
# Requires API token and an active Keboola bucket
|
|
|
|
# ValueError: Root URL is required.
|
|
|
|
doCheck = false;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
unittestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"kbcstorage"
|
|
|
|
"kbcstorage.buckets"
|
|
|
|
"kbcstorage.client"
|
|
|
|
"kbcstorage.tables"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Keboola Connection Storage API client";
|
|
|
|
homepage = "https://github.com/keboola/sapi-python-client";
|
|
|
|
changelog = "https://github.com/keboola/sapi-python-client/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mrmebelman ];
|
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
}
|