# -*- 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.6
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  ca0bb86c44c4103924c2e9c72e5e4c5d55be1c92 \
                    sha256  2b73e66b22719ea48ac08a93fc88e57ef36d46d03cb09d972063c9aa86bb74e6 \
                    size    239470

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
}
