python311Packages.qds-sdk: refactor

This commit is contained in:
natsukium 2023-10-21 10:47:38 +09:00
parent d9dcbbdb88
commit ccebea4132
No known key found for this signature in database
GPG key ID: 9EA45A31DB994C53

View file

@ -1,26 +1,32 @@
{ lib,
fetchFromGitHub,
buildPythonPackage,
boto,
inflection,
pytest,
mock,
requests,
six,
urllib3 }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, boto
, inflection
, requests
, six
, urllib3
, mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "qds-sdk";
version = "1.16.1";
pyproject = true;
# pypi does not contain tests, using github sources instead
src = fetchFromGitHub {
owner = "qubole";
repo = "qds-sdk-py";
rev = "V${version}";
sha256 = "05c7g63rcvvi4fgkcfsxh2a6hwlffbs18dhki222s5rpc49wi8zi";
rev = "refs/tags/V${version}";
hash = "sha256-8aPIE2E3Fy2EiBM2FPRyjnJolIBdOzafI3Fvlod5hxU=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
boto
inflection
@ -29,15 +35,17 @@ buildPythonPackage rec {
urllib3
];
nativeCheckInputs = [ pytest mock ];
checkPhase = ''
py.test --disable-pytest-warnings tests
'';
nativeCheckInputs = [ pytestCheckHook mock ];
pythonImportsCheck = [
"qds_sdk"
];
meta = with lib; {
description = "A Python module that provides the tools you need to authenticate with, and use the Qubole Data Service API";
homepage = "https://github.com/qubole/qds-sdk-py";
license = licenses.asl20;
maintainers = with maintainers; [ shahrukh330 ];
mainProgram = "qds.py";
};
}