# -*- 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 142374 2015-11-10 19:30:46Z petr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-gmpy
version             1.17
maintainers         alluvialsw.com:md14-macports openmaintainer
license             LGPL-2.1+
platforms           darwin
description         General multiple precision arithmetic module for Python
long_description \
    GMPY is a C-coded Python extension module that supports fast \
    integer and rational multiple-precision arithmetic using the \
    GMP library.

homepage            http://code.google.com/p/gmpy/
master_sites        https://pypi.python.org/packages/source/g/gmpy
distname            gmpy-${version}
use_zip             yes
checksums           rmd160  0465338605fa73695259082c973eab23d7d96cff \
                    sha256  1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14

python.versions     27 34 35

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

    post-destroot {
        xinstall -m 644 -W ${worksrcpath} doc/gmpydoc.txt doc/index.html \
            README ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       https://pypi.python.org/pypi/gmpy/json
    livecheck.regex     {gmpy-(\d+(?:\.\d+)*)\.[tz]}
}
