-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110456 from fabaff/sendgrid
- Loading branch information
Showing
5 changed files
with
118 additions
and
1 deletion.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
pkgs/development/python-modules/python-http-client/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
28
pkgs/development/python-modules/starkbank-ecdsa/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters