# -*- 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-pendulum
# Later versions broken by a switch to maturin:
# https://github.com/python-pendulum/pendulum/commit/5c01d00c52142b16934a6c3e2f191c42dd8bfb24
version             2.1.2
revision            0
license             MIT
maintainers         nomaintainer
description         Python datetimes made easy
long_description    Pendulum is a Python package to ease datetimes \
                    manipulation. It provides classes that are drop-in \
                    replacements for the native ones (they inherit from them).
homepage            https://pypi.python.org/pypi/${python.rootname}
checksums           rmd160  7c0fa29f559616634b7bada7b088983cb3e7c5ce \
                    sha256  b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207 \
                    size    81167

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    python.pep517_backend   poetry
    # https://trac.macports.org/ticket/64425
    build.cmd               pyproject-build-${python.branch} --wheel --no-isolation --outdir ${workpath}

    depends_build-append    port:py${python.version}-setuptools \
                            port:py${python.version}-wheel

    depends_lib-append      port:py${python.version}-dateutil \
                            port:py${python.version}-pytzdata

    livecheck.type  none
}
