# -*- 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

PortSystem          1.0
PortGroup           python 1.0

name                py-axiom
version             0.8.0
license             MIT
categories-append   databases
platforms           darwin
supported_archs     noarch

maintainers         nomaintainer

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/${python.rootname}
master_sites        pypi:a/${python.rootname}/

distname            ${python.rootname}-${version}

checksums           rmd160  4adfacc52aa4032165caa4cfc19186da570e0bd6 \
                    sha256  87a5d64ba82faa397d4bd3986e9b9fca87241656c6082535e0ee7d357a9500f4 \
                    size    218716

# restore setup.py that was intentionally deleted from version 0.8.0 upstream
post-patch {
    xinstall -m 755 ${filespath}/setup.py ${worksrcpath}
}

worksrcdir          ${python.rootname}-${version}

# as of version 0.8.0 only python27 is supported
# see https://github.com/twisted/axiom/issues/106 for status of python3 support
python.default_version  27
python.versions     27

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools_scm
    depends_lib-append      port:py${python.version}-epsilon \
                            port:py${python.version}-twisted
    livecheck.type          none
} else {
    livecheck.type          regex
    livecheck.url           ${homepage}
    livecheck.regex         "${python.rootname} (\\d+(?:\\.\\d+)*)"
}
