From 577fa81532e6e50c98e821bf7be52d4776b50bf3 Mon Sep 17 00:00:00 2001 From: Matt Wittmann Date: Fri, 27 Jan 2023 16:18:53 -0800 Subject: [PATCH] python310Packages.redshift-connector: init at 2.0.910 --- .../redshift-connector/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/redshift-connector/default.nix diff --git a/pkgs/development/python-modules/redshift-connector/default.nix b/pkgs/development/python-modules/redshift-connector/default.nix new file mode 100644 index 000000000000..467d5e1340b4 --- /dev/null +++ b/pkgs/development/python-modules/redshift-connector/default.nix @@ -0,0 +1,62 @@ +{ beautifulsoup4 +, boto3 +, buildPythonPackage +, fetchFromGitHub +, lib +, lxml +, packaging +, pytest-mock +, pytestCheckHook +, pythonOlder +, pytz +, requests +, scramp +}: + +buildPythonPackage rec { + pname = "redshift-connector"; + version = "2.0.910"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "aws"; + repo = "amazon-redshift-python-driver"; + rev = "refs/tags/v${version}"; + hash = "sha256-24yI6pXSHxhT30N3rJXAMtpCOhhGsBuDrwx9jMO1FW0="; + }; + + # disable test coverage + postPatch = '' + sed -i "/--cov/d" setup.cfg + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dac63cf3b790..362c7b9909cf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9848,6 +9848,8 @@ self: super: with self; { rednose = callPackage ../development/python-modules/rednose { }; + redshift-connector = callPackage ../development/python-modules/redshift-connector { }; + reedsolo = callPackage ../development/python-modules/reedsolo { }; reflink = callPackage ../development/python-modules/reflink { };