summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-msal/package.py
blob: b742cfd284d65d698d729b5c887c8e58d844f89b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack.package import *


class PyMsal(PythonPackage):
    """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."""

    homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python"
    pypi = "msal/msal-1.3.0.tar.gz"

    license("MIT")

    # If you get diamond dependency problems on py-pyjwt,
    # consider using v1.20.0, which has looser constraints
    version("1.20.0", sha256="78344cd4c91d6134a593b5e3e45541e666e37b747ff8a6316c3668dd1e6ab6b2")
    version("1.3.0", sha256="5442a3a9d006506e653d3c4daff40538bdf067bf07b6b73b32d1b231d5e77a92")
    version("1.0.0", sha256="ecbe3f5ac77facad16abf08eb9d8562af3bc7184be5d4d90c9ef4db5bde26340")

    # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/1.20.0/setup.py
    depends_on("py-setuptools", type="build")
    depends_on("py-requests@2.0.0:2", type=("build", "run"))
    depends_on("py-pyjwt@1.0.0:1+crypto", type=("build", "run"), when="@:1.3")
    depends_on("py-pyjwt@1.0.0:2+crypto", type=("build", "run"), when="@1.20:")
    depends_on("py-cryptography@0.6:40", type=("build", "run"), when="@1.20:")