# -*- 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
# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-rtree
version             0.7.0
revision            0
categories-append   devel
platforms           darwin
license             LGPL
supported_archs     noarch

python.versions     26 27

maintainers         stromnov openmaintainer

description         R-Tree spatial index for Python GIS

long_description    Rtree is a Python library that uses ctypes and an  \
                    internally built C API to wrap libspatialindex and \
                    provide very flexible spatial indexing.

homepage            http://trac.gispython.org/lab/wiki/Rtree
master_sites        http://pypi.python.org/packages/source/R/Rtree/

distname            Rtree-${version}

checksums           rmd160  f55bb6acd901a24fae3823da7ebe71f5b8c68dae \
                    sha256  cf95092f86e65a92164559e54f082433dcdf1bd3d1efe56f097c84d89e913a22

if {${name} ne ${subport}} {
    depends_lib-append  port:spatialindex

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

    patchfiles          patch-rtree_core.py.diff

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     "Rtree-(\\d+(?:\\.\\d+)*)\.\[tz\]"
}
