1{ 2 beautifulsoup4, 3 boto3, 4 buildPythonPackage, 5 fetchFromGitHub, 6 lib, 7 lxml, 8 packaging, 9 pytest-mock, 10 pytestCheckHook, 11 pythonOlder, 12 pytz, 13 requests, 14 scramp, 15}: 16 17buildPythonPackage rec { 18 pname = "redshift-connector"; 19 version = "2.1.8"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.6"; 23 24 src = fetchFromGitHub { 25 owner = "aws"; 26 repo = "amazon-redshift-python-driver"; 27 tag = "v${version}"; 28 hash = "sha256-q8TQYiPmm3w9Bh4+gvVW5XAa4FZ3+/MZqZL0RCgl77E="; 29 }; 30 31 # remove addops as they add test directory and coverage parameters to pytest 32 postPatch = '' 33 substituteInPlace setup.cfg --replace 'addopts =' 'no-opts =' 34 ''; 35 36 propagatedBuildInputs = [ 37 beautifulsoup4 38 boto3 39 lxml 40 packaging 41 pytz 42 requests 43 scramp 44 ]; 45 46 nativeCheckInputs = [ 47 pytest-mock 48 pytestCheckHook 49 ]; 50 51 # integration tests require a Redshift cluster 52 enabledTestPaths = [ "test/unit" ]; 53 54 __darwinAllowLocalNetworking = true; # required for tests 55 56 meta = { 57 description = "Redshift interface library"; 58 homepage = "https://github.com/aws/amazon-redshift-python-driver"; 59 changelog = "https://github.com/aws/amazon-redshift-python-driver/releases/tag/${src.tag}"; 60 license = lib.licenses.asl20; 61 maintainers = with lib.maintainers; [ mcwitt ]; 62 }; 63}