From 5c8fbc5e8d9d8ea8ef60f7b14ac5fcbdb833c513 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 28 Jan 2024 15:45:59 +0100 Subject: [PATCH] python311Packages.awsipranges: init at 0.3.3 Module to work with the AWS IP address ranges https://github.com/aws-samples/awsipranges --- .../python-modules/awsipranges/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/awsipranges/default.nix diff --git a/pkgs/development/python-modules/awsipranges/default.nix b/pkgs/development/python-modules/awsipranges/default.nix new file mode 100644 index 000000000000..036639c3cdb7 --- /dev/null +++ b/pkgs/development/python-modules/awsipranges/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pyopenssl +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "awsipranges"; + version = "0.3.3"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aws-samples"; + repo = "awsipranges"; + rev = "refs/tags/${version}"; + hash = "sha256-ve1+0zkDDUGswtQoXhfESMcBzoNgUutxEhz43HXL4H8="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + pyopenssl + pytestCheckHook + ]; + + pythonImportsCheck = [ + "awsipranges" + ]; + + disabledTestPaths = [ + # Tests require network access + "tests/data/test_syntax_and_semantics.py" + "tests/integration/test_package_apis.py" + "tests/unit/test_data_loading.py" + ]; + + meta = with lib; { + description = "Module to work with the AWS IP address ranges"; + homepage = "https://github.com/aws-samples/awsipranges"; + changelog = "https://github.com/aws-samples/awsipranges/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6375fac04d61..eae87e3743af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1012,6 +1012,8 @@ self: super: with self; { awsiotpythonsdk = callPackage ../development/python-modules/awsiotpythonsdk { }; + awsipranges = callPackage ../development/python-modules/awsipranges { }; + awslambdaric = callPackage ../development/python-modules/awslambdaric { }; awswrangler = callPackage ../development/python-modules/awswrangler { };