# -*- 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-logilab-constraint
version             0.6.0
revision            0
categories-append   devel
platforms           darwin
license             GPL-2+
supported_archs     noarch

python.versions     27 35 36

maintainers         {stromnov @stromnov} openmaintainer

description         python module for solving constraint satisfaction problems

long_description    The constraint package is a constraint satisfaction \
                    problem solver written in 100% pure Python, using \
                    constraint propagation algorithms. So far, facilities \
                    are provided to work with finite domains only.

homepage            https://www.logilab.org/project/logilab-constraint
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}

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

checksums           rmd160  837ae8246892162f5886b2ee477ea0f9f7899bba \
                    sha256  8f494b26ab584c24c156a569fabe16424b482907cc6f8cfdf6c40619498d1dd8

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-logilab-common

    post-destroot   {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 755 -d ${destroot}${prefix}/share/examples/${subport}

        xinstall -m 644 -W ${worksrcpath} \
            doc/CONTRIBUTORS doc/documentation.html doc/documentation.xml \
            README COPYING ChangeLog \
            ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 {*}[glob ${worksrcpath}/examples/*] \
            ${destroot}${prefix}/share/examples/${subport}

        file delete ${destroot}${python.pkgd}/logilab/__init__.py
    }

    livecheck.type      none
} else {
    livecheck.type      pypi
}