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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

python311Packages.msgraph-core: 0.2.2 -> 1.0.0 #283337

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions nixos/modules/services/monitoring/parsedmarc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ in
];
dashboards.settings.providers = lib.mkIf cfg.provision.grafana.dashboard [{
name = "parsedmarc";
options.path = "${pkgs.python3Packages.parsedmarc.dashboard}";
options.path = "${pkgs.parsedmarc.dashboard}";
}];
};
};
Expand Down Expand Up @@ -530,7 +530,7 @@ in
MemoryDenyWriteExecute = true;
LockPersonality = true;
SystemCallArchitectures = "native";
ExecStart = "${pkgs.python3Packages.parsedmarc}/bin/parsedmarc -c /run/parsedmarc/parsedmarc.ini";
ExecStart = "${lib.getExe pkgs.parsedmarc} -c /run/parsedmarc/parsedmarc.ini";
};
};

Expand Down
41 changes: 41 additions & 0 deletions pkgs/by-name/pa/parsedmarc/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, python3
, fetchFromGitHub
}:

let
python = python3.override {
packageOverrides = self: super: {
# https://github.com/domainaware/parsedmarc/issues/464
msgraph-core = super.msgraph-core.overridePythonAttrs (old: rec {
version = "0.2.2";

src = fetchFromGitHub {
owner = "microsoftgraph";
repo = "msgraph-sdk-python-core";
rev = "v${version}";
hash = "sha256-eRRlG3GJX3WeKTNJVWgNTTHY56qiUGOlxtvEZ2xObLA=";
};

nativeBuildInputs = with self; [
flit-core
];

propagatedBuildInputs = with self; [
requests
];

nativeCheckInputs = with self; [
pytestCheckHook
responses
];

disabledTestPaths = [
"tests/integration"
];

pythonImportsCheck = [ "msgraph.core" ];
});
};
};
in with python.pkgs; toPythonApplication parsedmarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, opentelemetry-api
, opentelemetry-sdk
, std-uritemplate
, pytest-asyncio
, pytest-mock
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "microsoft-kiota-abstractions";
version = "1.0.0";
pyproject = true;

src = fetchFromGitHub {
owner = "microsoft";
repo = "kiota-abstractions-python";
rev = "v${version}";
hash = "sha256-lIhVBEZsxq6VnldlgpEknfF3/sOnATCYzvY4V6wZCz4=";
};

nativeBuildInputs = [
flit-core
];

propagatedBuildInputs = [
opentelemetry-api
opentelemetry-sdk
std-uritemplate
];

pythonImportsCheck = [ "kiota_abstractions" ];

nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
];

meta = {
changelog = "https://github.com/microsoft/kiota-abstractions-python/blob/${src.rev}/CHANGELOG.md";
description = "Abstractions library for Kiota generated Python clients";
homepage = "https://github.com/microsoft/kiota-abstractions-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, aiohttp
, azure-core
, microsoft-kiota-abstractions
, opentelemetry-api
, opentelemetry-sdk
, pytest-asyncio
, pytest-mock
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "microsoft-kiota-authentication-azure";
version = "1.0.0";
pyproject = true;

src = fetchFromGitHub {
owner = "microsoft";
repo = "kiota-authentication-azure-python";
rev = "v${version}";
hash = "sha256-RA0BbIwDs3cXiH4tQsvCGUO1OAg+DWjEeWd7MEVIC8E=";
};

nativeBuildInputs = [
flit-core
];

propagatedBuildInputs = [
aiohttp
azure-core
microsoft-kiota-abstractions
opentelemetry-api
opentelemetry-sdk
];

pythonImportsCheck = [ "kiota_authentication_azure" ];

nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
];

meta = {
changelog = "https://github.com/microsoft/kiota-authentication-azure-python/blob/${src.rev}/CHANGELOG.md";
description = "Kiota Azure authentication provider for python clients";
homepage = "https://github.com/microsoft/kiota-authentication-azure-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/microsoft-kiota-http/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, httpx
, microsoft-kiota-abstractions
, opentelemetry-api
, opentelemetry-sdk
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, urllib3
}:

buildPythonPackage rec {
pname = "microsoft-kiota-http";
version = "1.2.1";
pyproject = true;

src = fetchFromGitHub {
owner = "microsoft";
repo = "kiota-http-python";
rev = "v${version}";
hash = "sha256-BGMEndYa1ZMKWw18Fs9S/ieMhu+e4tKQW57CC3g0P0Q=";
};

nativeBuildInputs = [
flit-core
];

propagatedBuildInputs = [
httpx
microsoft-kiota-abstractions
opentelemetry-api
opentelemetry-sdk
] ++ httpx.optional-dependencies.http2;

pythonImportsCheck = [ "kiota_http" ];

nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
urllib3
];

meta = {
changelog = "https://github.com/microsoft/kiota-http-python/blob/${src.rev}/CHANGELOG.md";
description = "HTTP request adapter implementation for Kiota clients for Python";
homepage = "https://github.com/microsoft/kiota-http-python";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
35 changes: 19 additions & 16 deletions pkgs/development/python-modules/msgraph-core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,50 @@
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, flit-core
, requests
, setuptools
, httpx
, microsoft-kiota-abstractions
, microsoft-kiota-authentication-azure
, microsoft-kiota-http
, azure-identity
, pytestCheckHook
, responses
}:

buildPythonPackage rec {
pname = "msgraph-core";
version = "0.2.2";
version = "1.0.0";

disabled = pythonOlder "3.5";
disabled = pythonOlder "3.8";

format = "pyproject";
pyproject = true;

src = fetchFromGitHub {
owner = "microsoftgraph";
repo = "msgraph-sdk-python-core";
rev = "v${version}";
hash = "sha256-eRRlG3GJX3WeKTNJVWgNTTHY56qiUGOlxtvEZ2xObLA=";
hash = "sha256-VizjN7sXqPvo9VOSaaUnogTlUDJ1OA2COYNTcVRqhJA=";
};

nativeBuildInputs = [
flit-core
setuptools
];

propagatedBuildInputs = [
requests
];
httpx
microsoft-kiota-abstractions
microsoft-kiota-authentication-azure
microsoft-kiota-http
] ++ httpx.optional-dependencies.http2;

nativeCheckInputs = [
azure-identity
pytestCheckHook
responses
];

disabledTestPaths = [
"tests/integration"
];

pythonImportsCheck = [ "msgraph.core" ];
pythonImportsCheck = [ "msgraph_core" ];

meta = {
changelog = "https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/${src.rev}/CHANGELOG.md";
description = "Core component of the Microsoft Graph Python SDK";
homepage = "https://github.com/microsoftgraph/msgraph-sdk-python-core";
license = lib.licenses.mit;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/parsedmarc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@ buildPythonPackage rec {
license = licenses.asl20;
maintainers = with maintainers; [ talyz ];
mainProgram = "parsedmarc";
# https://github.com/domainaware/parsedmarc/issues/464
broken = lib.versionAtLeast msgraph-core.version "1.0.0";
};
}
33 changes: 33 additions & 0 deletions pkgs/development/python-modules/std-uritemplate/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, poetry-core
}:

buildPythonPackage rec {
pname = "std-uritemplate";
version = "0.0.50";
pyproject = true;

src = fetchPypi {
pname = "std_uritemplate";
inherit version;
hash = "sha256-ZeMNxtZm+rltW4pD9/46lHEVFdExSL7b5N02T3AYk+k=";
};

nativeBuildInputs = [
poetry-core
];

pythonImportsCheck = [ "stduritemplate" ];

# tests not shipped on PyPI, no tags on GitHub
doCheck = false;

meta = {
description = "Std-uritemplate implementation for Python";
homepage = "https://github.com/andreaTP/std-uritemplate";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40838,8 +40838,6 @@ with pkgs;

OSCAR = qt5.callPackage ../applications/misc/OSCAR { };

parsedmarc = with python3Packages; toPythonApplication parsedmarc;

pgmanage = callPackage ../applications/misc/pgmanage { };

pgadmin4 = callPackage ../tools/admin/pgadmin { };
Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7032,6 +7032,12 @@ self: super: with self; {

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

microsoft-kiota-abstractions = callPackage ../development/python-modules/microsoft-kiota-abstractions { };

microsoft-kiota-authentication-azure = callPackage ../development/python-modules/microsoft-kiota-authentication-azure { };

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

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

mido = callPackage ../development/python-modules/mido { };
Expand Down Expand Up @@ -13834,6 +13840,8 @@ self: super: with self; {

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

std-uritemplate = callPackage ../development/python-modules/std-uritemplate { };

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

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