# -*- 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-netaddr
version             0.7.19
categories-append   devel
platforms           darwin
license             BSD MIT
supported_archs     noarch

python.versions     27 34 35 36

maintainers         {stromnov @stromnov} openmaintainer

description         A network address manipulation library for Python
long_description    ${description}

homepage            https://github.com/drkjam/netaddr/
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}

distname            ${python.rootname}-${version}

checksums           rmd160  726d351f5c2a2e13446322c9ffd169215deb2601 \
                    sha256  38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd \
                    size    1622835

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

    depends_test-append \
                        port:py${python.version}-pytest

    # patch for tests from commit 2ab73f1; remove at next update
    patchfiles          patch-test_ieee_parsers.py.diff
    test.run            yes
    test.cmd            py.test-${python.branch}
    test.target

    livecheck.type      none
}