2023-02-02 18:25:31 +00:00
|
|
|
{ beautifulsoup4
|
|
|
|
, boto3
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, lxml
|
|
|
|
, packaging
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, scramp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "redshift-connector";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.1.0";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "amazon-redshift-python-driver";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-EYJFJbeYUW/vCD46sm5CLeyINL/hcF7IA2myuVmqFaY=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# remove addops as they add test directory and coverage parameters to pytest
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace setup.cfg --replace 'addopts =' 'no-opts ='
|
2023-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
boto3
|
|
|
|
lxml
|
|
|
|
packaging
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
scramp
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# integration tests require a Redshift cluster
|
|
|
|
pytestFlagsArray = [ "test/unit" ];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true; # required for tests
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Redshift interface library";
|
|
|
|
homepage = "https://github.com/aws/amazon-redshift-python-driver";
|
|
|
|
changelog = "https://github.com/aws/amazon-redshift-python-driver/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ mcwitt ];
|
|
|
|
};
|
|
|
|
}
|