# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        aio-libs aiomysql 0.2.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                py-${github.project}
revision            0
categories-append   devel

license             MIT
maintainers         nomaintainer
supported_archs     noarch
platforms           {darwin any}

description         MySQL driver for asyncio.
long_description    aiomysql is a "driver" for accessing a MySQL \
                    database from the asyncio (PEP-3156/tulip) \
                    framework. It depends on and reuses most parts of \
                    PyMySQL . aiomysql tries to be like awesome aiopg \
                    library and preserve same api, look and feel.

checksums           rmd160  290ffe555e086579831984ce7baacc237f399e03 \
                    sha256  676694fa7eea45012e674ee360eab2b66a1fb9299ce98f2b6aa34d18e1c77f02 \
                    size    106581

python.versions     310

if {${name} ne ${subport}} {
    patchfiles-append \
                    patch-pyproject.toml.diff

    depends_build-append \
                    port:py${python.version}-setuptools_scm \
                    port:py${python.version}-setuptools_scm_git_archive \
                    port:py${python.version}-toml

    depends_run-append \
                    port:py${python.version}-pymysql

    depends_test-append \
                    port:py${python.version}-docker

    pre-test {
        # See https://docs.pytest.org/en/stable/pythonpath.html
        delete ${test.dir}/${test.target}/__init__.py
    }

    test.run        no
}
