# -*- 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

# py-pycryptodomex stays on the upstream-maintained 3.x branch.
name                py-pycryptodome
version             4.2.0

homepage            https://www.pycryptodome.org

license             BSD public-domain MIT
maintainers         nomaintainer

description         Cryptographic library for Python
long_description    PyCryptodome is a self-contained Python package of \
                    low-level cryptographic primitives. \
                    PyCryptodome is a fork of PyCrypto.

python.versions     27 310 311 312 313 314 315

checksums           rmd160  b639aa36a145b1d3476cc507ed81659a49f144e9 \
                    sha256  21d7fdba239d6ef863d3d08388801c683453a3bb4897c2b27f27847aad89bdf7 \
                    size    1750332

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools

    test.run            yes

    if {${python.version} == 27} {
        version         3.24.1
        license         BSD

        checksums       rmd160  7b6186f10fba52d6f97e20cd19d717270740c3ca \
                        sha256  3f9e74444c0ecbec7af232a95d282c74b114d53212ce075ed17b7fd7dca32bb3 \
                        size    4932558

        livecheck.type  none

        python.test_framework
        test.cmd        ${python.bin} setup.py test
    } else {
        test.args-append \
                        -p Crypto.SelfTest.plugin \
                        -p no:cacheprovider \
                        --pyargs Crypto.SelfTest
    }
}
