# -*- 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-imagesize
version             2.0.1
revision            0

categories-append   devel graphics
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         get size from image file headers
long_description    This module analyzes jpeg/jpeg2000/png/gif image headers \
                    and returns the image size.

homepage            https://github.com/shibukawa/imagesize_py

checksums           rmd160 3e50afc04ca0a67fc7e8595dad736f3e0677e725 \
                    sha256 b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5 \
                    size   1883774

python.versions     27 310 311 312 313 314

if {$subport ne $name} {
    if {${python.version} == 27} {
        version     1.5.0
        revision    0
        checksums   rmd160  628bf28791c532f0c2e42871ed9122658e39f951 \
                    sha256  8bfc5363a7f2133a89f0098451e0bcb1cd71aba4dc02bbcecb39d99d40e1b94f \
                    size    1281127

        depends_build-append \
                    port:py${python.version}-setuptools
    }

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} README.rst \
           ${destroot}${prefix}/share/doc/${subport}
    }

    test.run        yes
    python.test_framework   unittest
}
