# -*- 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-pymongo
version             4.12.0
revision            0
categories-append   databases
license             Apache

python.versions     310 311 312 313
python.pep517_backend hatch

maintainers         {stromnov @stromnov} openmaintainer

description         Python access to MongoDB

long_description \
        The PyMongo distribution contains tools for interacting with \
        the Mongo database from Python.

homepage            https://www.mongodb.org/

checksums           rmd160  bd20ce9235cc82060bb3d4e7a290f23fd4b1e73f \
                    sha256  d9f74a5cf3fccdb72211e33e07a6c05ac09cd0d7c99d21db5c2473fcfdd03152 \
                    size    2161377

if {${name} ne ${subport}} {
    conflicts           py${python.version}-bson

    depends_build-append \
                         port:py${python.version}-hatch-requirements-txt

    depends_lib-append  port:py${python.version}-dnspython

    post-destroot {
        xinstall -m 755 -d ${destroot}${python.prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} README.md \
            ${destroot}${python.prefix}/share/doc/${subport}
    }
}
