# -*- 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-curl
python.rootname     pycurl
version             7.45.4
revision            0

categories-append   net devel
license             {MIT LGPL}
maintainers         nomaintainer

description         Python interface to libcurl
long_description    Python module interface to the cURL library which \
                    is a tool for transferring files with URL syntax, \
                    supporting many protocols.

homepage            http://pycurl.io/

checksums           rmd160  d2509abe6f6c4e30143c4658577e45480725805e \
                    sha256  32c8e237069273f4260b6ae13d1e0f99daae938977016021565dc6e11050e803 \
                    size    238427

python.versions     27 39 310 311 312 313

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     7.43.0.3
        revision    2
        checksums   rmd160  32673e8d1e9ed4872d9b9d5d8272963f7749cc74 \
                    sha256  6f08330c5cf79fa8ef68b9912b9901db7ffd34b63e225dce74db56bb21deda8e \
                    size    215003
    }

    depends_lib-append  port:curl \
                        path:lib/libssl.dylib:openssl

    pre-build {
        system -W ${build.dir} "${python.bin} setup.py docstrings"
    }

    if {${python.pep517}} {
        build.args      "--config-setting='--curl-config=${prefix}/bin/curl-config'"
    } else {
        build.args      --curl-config=${prefix}/bin/curl-config
        destroot.args   {*}${build.args}
    }

    livecheck.type  none
}
