python3Packages.kbcstorage: rename from sapi-python-client; fix build
This commit is contained in:
parent
3c1742cc08
commit
1ac3bb0c7d
4 changed files with 72 additions and 32 deletions
69
pkgs/development/python-modules/kbcstorage/default.nix
Normal file
69
pkgs/development/python-modules/kbcstorage/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
|
||||
# build
|
||||
, setuptools-scm
|
||||
|
||||
# propagates
|
||||
, azure-storage-blob
|
||||
, boto3
|
||||
, requests
|
||||
|
||||
# tests
|
||||
, responses
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sapi-python-client";
|
||||
version = "0.4.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "keboola";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "189dzj06vzp7366h2qsfvbjmw9qgl7jbp8syhynn9yvrjqp4k8h3";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
azure-storage-blob
|
||||
boto3
|
||||
requests
|
||||
];
|
||||
|
||||
# requires API token and an active keboola bucket
|
||||
# ValueError: Root URL is required.
|
||||
doCheck = false;
|
||||
|
||||
checkInputs = [
|
||||
responses
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${python.interpreter} -m unittest discover
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"kbcstorage"
|
||||
"kbcstorage.buckets"
|
||||
"kbcstorage.client"
|
||||
"kbcstorage.tables"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Keboola Connection Storage API client";
|
||||
homepage = "https://github.com/keboola/sapi-python-client";
|
||||
maintainers = with maintainers; [ mrmebelman ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ lib, git, setuptools, setuptools-scm, fetchFromGitHub, requests, boto3, buildPythonPackage, responses }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sapi-python-client";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "keboola";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "189dzj06vzp7366h2qsfvbjmw9qgl7jbp8syhynn9yvrjqp4k8h3";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's|use_scm_version=True|version="${version}"|' setup.py
|
||||
'';
|
||||
|
||||
doCheck = false; # requires API token and an active keboola bucket
|
||||
|
||||
nativeBuildInputs = [ git setuptools-scm ];
|
||||
|
||||
propagatedBuildInputs = [ setuptools requests boto3 responses ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Keboola Connection Storage API client";
|
||||
homepage = "https://github.com/keboola/sapi-python-client";
|
||||
maintainers = with maintainers; [ mrmebelman ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
|
@ -121,6 +121,7 @@ mapAliases ({
|
|||
ruamel_base = ruamel-base; # added 2021-11-01
|
||||
ruamel_yaml = ruamel-yaml; # added 2021-11-01
|
||||
ruamel_yaml_clib = ruamel-yaml-clib; # added 2021-11-01
|
||||
sapi-python-client = kbcstorage; # added 2022-04-20
|
||||
scikitlearn = scikit-learn; # added 2021-07-21
|
||||
selectors34 = throw "selectors34 has been removed: functionality provided by Python itself; archived by upstream."; # added 2021-06-10
|
||||
setuptools_scm = setuptools-scm; # added 2021-06-03
|
||||
|
|
|
@ -4485,6 +4485,8 @@ in {
|
|||
|
||||
kazoo = callPackage ../development/python-modules/kazoo { };
|
||||
|
||||
kbcstorage = callPackage ../development/python-modules/kbcstorage { };
|
||||
|
||||
kconfiglib = callPackage ../development/python-modules/kconfiglib { };
|
||||
|
||||
keep = callPackage ../development/python-modules/keep { };
|
||||
|
@ -9088,8 +9090,6 @@ in {
|
|||
|
||||
sanic-testing = callPackage ../development/python-modules/sanic-testing { };
|
||||
|
||||
sapi-python-client = callPackage ../development/python-modules/sapi-python-client { };
|
||||
|
||||
sarif-om = callPackage ../development/python-modules/sarif-om { };
|
||||
|
||||
sarge = callPackage ../development/python-modules/sarge { };
|
||||
|
|
Loading…
Reference in a new issue