# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-msalruntime
version             0.20.6
categories          python security
license             MIT
maintainers         nomaintainer
supported_archs     arm64 x86_64
platforms           {darwin >= 20}

description         Native MSAL broker runtime for Python
long_description    {*}${description}, used by the Microsoft Authentication \
                    Library for broker-based authentication.

homepage            https://pypi.org/project/pymsalruntime
python.versions     314

# PyPI currently ships platform wheels but no source distribution:
# https://github.com/AzureAD/microsoft-authentication-library-for-python/issues/811
if {${name} ne ${subport}} {
    if {${configure.build_arch} eq "arm64"} {
        master_sites    https://files.pythonhosted.org/packages/a1/a1/8be4caae5218c8249e4699f2f511126d714b7667d10ae69cdefc36d312ff/
        distname        pymsalruntime-${version}-cp${python.version}-cp${python.version}-macosx_11_0_arm64
        checksums       rmd160  46eb96586eeb5cbdd86389375e4481cfae781eec \
                        sha256  b135a282d3357edbf52b380c40f0cf9967946c0c7b009d65e78f7d5fee714541 \
                        size    2303108
    } else {
        master_sites    https://files.pythonhosted.org/packages/27/1f/308aedd76877280437ad9db1cbfc3dab70b7b9569b848ba385ef41a2f597/
        distname        pymsalruntime-${version}-cp${python.version}-cp${python.version}-macosx_11_0_x86_64
        checksums       rmd160  1525f5237be66425ffeb545387852d85b2d37b2f \
                        sha256  696faefab49f8de8144f2946b6efc1b0190fd15fb341c5ee89b5d3b9595e5722 \
                        size    2562004
    }

    dist_subdir         ${name}/${version}
    extract.suffix      .whl
    extract.only

    build               {}
    destroot.target     ${distpath}/${distfiles}
}

livecheck.type      pypi
