mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 00:54:40 +00:00
python310Packages.msal: update substituteInPlace
- disable on older Python releases
This commit is contained in:
parent
074c84c777
commit
32c7454af4
@ -1,19 +1,21 @@
|
||||
{ buildPythonPackage
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, lib
|
||||
|
||||
# pythonPackages
|
||||
, pyjwt
|
||||
, pythonOlder
|
||||
, requests
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "msal";
|
||||
version = "1.19.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-ZeMp1py/5Iuz3TI2se+OTMkfhpY3YGwYTiJ+htKwYp0=";
|
||||
hash = "sha256-ZeMp1py/5Iuz3TI2se+OTMkfhpY3YGwYTiJ+htKwYp0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -21,21 +23,21 @@ buildPythonPackage rec {
|
||||
requests
|
||||
];
|
||||
|
||||
# we already have cryptography included, version bounds are causing issues
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "PyJWT[crypto]>=1.0.0,<3" "PyJWT" \
|
||||
--replace "cryptography>=0.6,<38" "cryptography"
|
||||
--replace "PyJWT[crypto]>=1.0.0,<3" "PyJWT"
|
||||
'';
|
||||
|
||||
# Tests assume Network Connectivity:
|
||||
# https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "msal" ];
|
||||
pythonImportsCheck = [
|
||||
"msal"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect";
|
||||
description = "Library to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect";
|
||||
homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kamadorueda ];
|
||||
|
Loading…
Reference in New Issue
Block a user