From f4129f97aacb73f5cda3659a1167bfdbc2720b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 19 May 2022 21:39:53 +0000 Subject: [PATCH 1/2] python3Packages.msgraph-core: init at 0.2.2 --- .../python-modules/msgraph-core/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/msgraph-core/default.nix diff --git a/pkgs/development/python-modules/msgraph-core/default.nix b/pkgs/development/python-modules/msgraph-core/default.nix new file mode 100644 index 000000000000..22e18e5975f2 --- /dev/null +++ b/pkgs/development/python-modules/msgraph-core/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, flit-core +, requests +, pytestCheckHook +, responses +}: + +buildPythonPackage rec { + pname = "msgraph-core"; + version = "0.2.2"; + + disabled = pythonOlder "3.5"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "microsoftgraph"; + repo = "msgraph-sdk-python-core"; + rev = "v${version}"; + hash = "sha256-eRRlG3GJX3WeKTNJVWgNTTHY56qiUGOlxtvEZ2xObLA="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + pytestCheckHook + responses + ]; + + disabledTestPaths = [ + "tests/integration" + ]; + + pythonImportsCheck = [ "msgraph.core" ]; + + meta = { + description = "Core component of the Microsoft Graph Python SDK"; + homepage = "https://github.com/microsoftgraph/msgraph-sdk-python-core"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e9f377f58584..f79e3d5ff6e9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6311,6 +6311,8 @@ in { micloud = callPackage ../development/python-modules/micloud { }; + msgraph-core = callPackage ../development/python-modules/msgraph-core { }; + netmap = callPackage ../development/python-modules/netmap { }; openai = callPackage ../development/python-modules/openai { }; From da7ccf3f63311da228604389a30d8e4ac151d99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 19 May 2022 21:19:35 +0000 Subject: [PATCH 2/2] python3Packages.parsedmarc: 7.0.1 -> 8.2.0 --- .../python-modules/parsedmarc/default.nix | 47 ++++++++++++++----- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/parsedmarc/default.nix b/pkgs/development/python-modules/parsedmarc/default.nix index 7cba1c227a85..c07a773eee17 100644 --- a/pkgs/development/python-modules/parsedmarc/default.nix +++ b/pkgs/development/python-modules/parsedmarc/default.nix @@ -1,26 +1,35 @@ { buildPythonPackage , fetchPypi , fetchurl -, pythonOlder , lib , nixosTests +, python +, pythonOlder # pythonPackages -, tqdm , dnspython , expiringdict -, urllib3 -, requests , publicsuffix2 , xmltodict , geoip2 +, urllib3 +, requests , imapclient , dateparser +, mailsuite +, elasticsearch , elasticsearch-dsl , kafka-python -, mailsuite +, tqdm , lxml , boto3 +, msgraph-core +, azure-identity +, google-api-core +, google-api-python-client +, google-auth +, google-auth-httplib2 +, google-auth-oauthlib }: let @@ -31,33 +40,49 @@ let in buildPythonPackage rec { pname = "parsedmarc"; - version = "7.0.1"; + version = "8.2.0"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1mi4hx410y7ikpfy1582lm252si0c3yryj0idqgqbx417fm21jjc"; + sha256 = "eb82328dffb4a62ddaefbcc22efd5a2694350504a56d41ba1e161f2d998dcbff"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "elasticsearch<7.14.0" "elasticsearch" + ''; + propagatedBuildInputs = [ - tqdm dnspython expiringdict - urllib3 - requests publicsuffix2 xmltodict geoip2 + urllib3 + requests imapclient dateparser + mailsuite + elasticsearch elasticsearch-dsl kafka-python - mailsuite + tqdm lxml boto3 + msgraph-core + azure-identity + google-api-core + google-api-python-client + google-auth + google-auth-httplib2 + google-auth-oauthlib ]; + # no tests on PyPI, no tags on GitHub + doCheck = false; + pythonImportsCheck = [ "parsedmarc" ]; passthru = {