# -*- 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 118175 2014-03-24 20:02:31Z devans@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-axiom
set gname           python-axiom
version             0.7.1
license             MIT
categories-append   databases
platforms           darwin
supported_archs     noarch

maintainers         devans openmaintainer

description         Axiom is an object database, or alternatively, an object-relational \
                    mapper, implemented on top of Python.

long_description    ${description} \
                    Its primary goal is to provide an object-oriented layer with the key \
                    aspects of OOP (Object Oriented Programming), i.e. polymorphism and \
                    message dispatch, without hindering the power of an RDBMS \
                    (Relational DataBase Management System).

homepage            https://pypi.python.org/pypi/Axiom
master_sites        debian:p/${gname}

distname            ${gname}_${version}.orig

checksums           rmd160  97982b7287320bd785114c246bc14f594bda4ea7 \
                    sha256  1036ee3cdf8ce7f20f845f80a25334c84b021838cc373e88ce564e4f2a413db9

worksrcdir          Axiom-${version}

python.default_version  27
python.versions     26 27


if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-epsilon \
                            port:py${python.version}-sqlite

    patchfiles-append       patch-python26.diff

    post-destroot {
          set filepath ${destroot}${python.libdir}/site-packages/twisted/plugins/dropin.cache 
          if {[file exists ${filepath}]} {
              file delete ${filepath}
          }
    }
}

livecheck.type      regex
livecheck.url       http://ftp.us.debian.org/debian/pool/main/p/${gname}/
livecheck.regex     "${gname}_(\\d+(?:\\.\\d+)*)\\.orig${extract.suffix}"
