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

# keep version in sync with the pybind11 port
name                py-pybind11
version             3.0.1
revision            0
categories-append   devel
license             BSD
supported_archs     noarch
platforms           {darwin any}

python.versions     27 39 310 311 312 313 314

maintainers         {stromnov @stromnov} openmaintainer

description         Seamless operability between C++11 and Python.

long_description    pybind11 is a lightweight header-only library that \
                    exposes C++ types in Python and vice versa, mainly \
                    to create Python bindings of existing C++ code.

homepage            https://github.com/pybind/pybind11

checksums           rmd160  47258e2c433aaaa64161e5d3c4b182dfc73dd073 \
                    sha256  9c0f40056a016da59bab516efb523089139fcc6f2ba7e4930854c61efb932051 \
                    size    546914

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version             2.4.3
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  8251d360b0c7e9bd220cb4a7cff8978f9ab8718d \
                            sha256  72e6def53fb491f7f4e92692029d2e7bb5a0783314f20d80222735ff10a75758 \
                            size    138789

        depends_build-append \
                            port:py${python.version}-setuptools
    } else {
        depends_build-append \
                            port:ninja \
                            port:py${python.version}-scikit-build-core
    }

    livecheck.type      none
}
