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