nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 85 lines 2.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 beautifulsoup4, 11 boto3, 12 botocore, 13 lxml, 14 packaging, 15 pytz, 16 requests, 17 scramp, 18 19 # test 20 pytest-mock, 21 pytestCheckHook, 22}: 23 24buildPythonPackage rec { 25 pname = "redshift-connector"; 26 version = "2.1.10"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "aws"; 31 repo = "amazon-redshift-python-driver"; 32 tag = "v${version}"; 33 hash = "sha256-k4Itd+x+1NbDsot2feunMKQVZA7ngAE4Bvy6+07gdaY="; 34 }; 35 36 # remove addops as they add test directory and coverage parameters to pytest 37 postPatch = '' 38 substituteInPlace setup.cfg --replace 'addopts =' 'no-opts =' 39 ''; 40 41 build-system = [ setuptools ]; 42 43 dependencies = [ 44 beautifulsoup4 45 boto3 46 botocore 47 lxml 48 packaging 49 pytz 50 requests 51 scramp 52 ]; 53 54 pythonRelaxDeps = [ "lxml" ]; 55 56 nativeCheckInputs = [ 57 pytest-mock 58 pytestCheckHook 59 ]; 60 61 # integration tests require a Redshift cluster 62 enabledTestPaths = [ "test/unit" ]; 63 64 disabledTests = [ 65 # AttributeError: 'itertools._tee' object has no attribute 'status_code' 66 # This is due to a broken pytest_mock. 67 # TODO Remove once pytest-mock 3.15.1 lands. 68 "test_form_based_authentication_uses_user_set_login_to_rp" 69 "test_form_based_authentication_payload_is_correct" 70 "test_form_based_authentication_login_fails_should_fail" 71 "test_azure_oauth_based_authentication_payload_is_correct" 72 "test_okta_authentication_payload_is_correct" 73 "test_set_cluster_identifier_calls_describe_custom_domain_associations" 74 ]; 75 76 __darwinAllowLocalNetworking = true; # required for tests 77 78 meta = { 79 description = "Redshift interface library"; 80 homepage = "https://github.com/aws/amazon-redshift-python-driver"; 81 changelog = "https://github.com/aws/amazon-redshift-python-driver/releases/tag/${src.tag}"; 82 license = lib.licenses.asl20; 83 maintainers = with lib.maintainers; [ mcwitt ]; 84 }; 85}