# -*- 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.10.1
revision            0
categories-append   databases
license             Apache

python.versions     39 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  5844612e2f25080c702e22b0c1e07c91d082ca62 \
                    sha256  a9de02be53b6bb98efe0b9eda84ffa1ec027fcb23a2de62c4f941d9a2f2f3330 \
                    size    1903902

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}
    }
}
