# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 106038 2013-05-13 22:44:52Z aronnax@macports.org $

PortSystem              1.0
PortGroup               python 1.0

name                    py-ephem
version                 3.7.5.1
categories-append       science
platforms               darwin
maintainers             aronnax openmaintainer
license                 LGPL-3
description             scientific-grade astronomy routines
long_description \
  PyEphem provides an ephem Python package for performing high-precision \
  astronomy computations. The underlying numeric routines are coded in C and \
  are the same ones that drive the popular XEphem astronomy application, whose \
  author, Elwood Charles Downey, generously gave permission for their use in \
  PyEphem. The name ephem is short for the word ephemeris, which is the \
  traditional term for a table giving the position of a planet, asteroid, or \
  comet for a series of dates.

homepage                http://rhodesmill.org/pyephem/
if {${subport} != ${name} && [expr ${python.branch} < 3]} {
    distname            pyephem-${version}
    master_sites        http://pypi.python.org/packages/source/p/pyephem/
    checksums           rmd160  3db09b2fb82d59d25db05d7842b9d90df62ba8b1 \
                        sha256  f24f8fc23c493fb842b44defc539762351a1d46b85f3d4f5043a002066afb50d
} else {
    distname ephem-${version}
    master_sites        http://pypi.python.org/packages/source/e/ephem/
    checksums           rmd160  20532a52ea5610c7b65cf32485d9668af710bcd6 \
                        sha256  652bdaa3826a15e6fa1976bcbe6ebfcf52ee458015b1a8feba3921bc6dc36161
}

python.versions         26 27 31 32 33

if {${subport} == ${name}} {
    livecheck.type      regex
    livecheck.url       {http://pypi.python.org/pypi?:action=doap&name=pyephem}
    livecheck.regex     {<release><Version><revision>([^<]+)</revision></Version></release>}
} else {
    livecheck.type      none
}
