# $Id: Portfile 120179 2014-05-18 15:57:25Z ram@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            py-tz
set my_name     pytz
version         2014.3
categories-append     devel
platforms       darwin
supported_archs noarch
maintainers     ram openmaintainer
license         MIT

description     World Timezone Definitions for Python
long_description \
    pytz brings the Olson tz database into Python. This library allows \
    accurate and cross platform timezone calculations.

homepage        http://pytz.sourceforge.net/
master_sites    http://cheeseshop.python.org/packages/source/p/pytz/
distname        ${my_name}-${version}
#use_zip         yes

python.versions 24 25 26 27 31 32 33 34

checksums       rmd160 d52a5c20453d7e2f23b8903635df3e5a831101ca \
                sha256 a2787443ae0a76712cfb013cc921fe304c4effc6068ad4ed6d58e96a8f9c50d6

post-destroot {
    if {${name} ne ${subport}} {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W $worksrcpath CHANGES.txt LICENSE.txt README.txt \
        ${destroot}${docdir}
    }
}

if {${name} eq ${subport}} {
  livecheck.type  regex
  livecheck.url   ${master_sites}?C=M&O=D
  livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
} else {
  livecheck.type  none
}
