Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.sendgrid: init at 6.5.0 #110456

Merged
merged 4 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions pkgs/development/python-modules/python-http-client/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, mock
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "python_http_client";
version = "3.3.1";

src = fetchFromGitHub {
owner = "sendgrid";
repo = "python-http-client";
rev = version;
sha256 = "0mbcg0vb9v41v7hbvycrxx5wyrf3ysvfgxkix8hn8c4x5l2lmidc";
};

checkInputs = [
mock
pytestCheckHook
];

# Failure was fixed by https://github.com/sendgrid/python-http-client/commit/6d62911ab0d0645b499e14bb17c302b48f3c10e4
disabledTests = [ "test__daterange" ];
pythonImportsCheck = [ "python_http_client" ];

meta = with lib; {
description = "Python HTTP library to call APIs";
homepage = "https://github.com/sendgrid/python-http-client";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}
49 changes: 49 additions & 0 deletions pkgs/development/python-modules/sendgrid/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flask
, pytestCheckHook
, python-http-client
, pyyaml
, starkbank-ecdsa
, werkzeug
}:

buildPythonPackage rec {
pname = "sendgrid";
version = "6.5.0";

src = fetchFromGitHub {
owner = pname;
repo = "sendgrid-python";
rev = version;
sha256 = "14kqjdv49486ksc1s0m0hc4k5nf9vn1v1g489mpib01hiiqxjp1b";
};

propagatedBuildInputs = [
python-http-client
starkbank-ecdsa
];

checkInputs = [
flask
pytestCheckHook
pyyaml
werkzeug
];

# Exclude tests that require network access
pytestFlagsArray = [
"--ignore test/test_sendgrid.py"
"--ignore live_test.py"
];

pythonImportsCheck = [ "sendgrid" ];

meta = with lib; {
description = "Python client for SendGrid";
homepage = "https://github.com/sendgrid/sendgrid-python";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}
28 changes: 28 additions & 0 deletions pkgs/development/python-modules/starkbank-ecdsa/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "starkbank-ecdsa";
version = "1.1.0";

src = fetchFromGitHub {
owner = "starkbank";
repo = "ecdsa-python";
rev = "v${version}";
sha256 = "03smk33zhmv1j1svgjnykak0jnw8yl0yv03i1gsasx71f33zmfwi";
};

checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "-v tests/*.py" ];
pythonImportsCheck = [ "ellipticcurve" ];

meta = with lib; {
description = "Python ECDSA library";
homepage = "https://github.com/starkbank/ecdsa-python";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}
2 changes: 1 addition & 1 deletion pkgs/servers/home-assistant/component-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@
"scsgate" = ps: with ps; [ ]; # missing inputs: scsgate
"search" = ps: with ps; [ aiohttp-cors ];
"season" = ps: with ps; [ ephem ];
"sendgrid" = ps: with ps; [ ]; # missing inputs: sendgrid
"sendgrid" = ps: with ps; [ sendgrid ];
"sense" = ps: with ps; [ ]; # missing inputs: sense_energy
"sensehat" = ps: with ps; [ ]; # missing inputs: sense-hat
"sensibo" = ps: with ps; [ ]; # missing inputs: pysensibo
Expand Down
6 changes: 6 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6197,6 +6197,8 @@ in {

python-hpilo = callPackage ../development/python-modules/python-hpilo { };

python-http-client = callPackage ../development/python-modules/python-http-client { };

python-igraph = callPackage ../development/python-modules/python-igraph {
pkg-config = pkgs.pkg-config;
igraph = pkgs.igraph;
Expand Down Expand Up @@ -6979,6 +6981,8 @@ in {

send2trash = callPackage ../development/python-modules/send2trash { };

sendgrid = callPackage ../development/python-modules/sendgrid { };

sentencepiece = callPackage ../development/python-modules/sentencepiece { inherit (pkgs) sentencepiece pkg-config; };

sentinel = callPackage ../development/python-modules/sentinel { };
Expand Down Expand Up @@ -7365,6 +7369,8 @@ in {
inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices;
};

starkbank-ecdsa = callPackage ../development/python-modules/starkbank-ecdsa { };

staticjinja = callPackage ../development/python-modules/staticjinja { };

statistics = callPackage ../development/python-modules/statistics { };
Expand Down