# -*- 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
PortGroup           github 1.0

github.setup        Electrostatics pdb2pqr 3.7.1 v
github.tarball_from tarball
revision            0

supported_archs     noarch
platforms           {darwin any}
license             BSD
categories          science python
maintainers         {gmail.com:howarth.at.macports @jwhowarth} openmaintainer

description         Preparation of protein structures for electrostatics calculations
long_description    {*}${description}

checksums           rmd160  36217b88caad59d4b0e6859fe55dfe32aaed9616 \
                    sha256  5f45293630eb316b1b0d4744a01d2df0d8567ea8b6d4dfa0862eb70f82111d31 \
                    size    13713998

python.default_version 314
python.pep517_backend hatch

pre-patch {
    foreach f {core_test.py propka_test.py ligand_test.py regression_test.py logging_test.py} {
        system "dos2unix \"${worksrcpath}/tests/${f}\""
    }
}

patchfiles          skip-network-tests.patch
patch.pre_args      -p1

post-patch {
    file delete ${worksrcpath}/pdb2pka
}

depends_patch-append \
                    port:dos2unix

depends_lib-append  port:py${python.version}-docutils \
                    port:py${python.version}-mmcif_pdbx \
                    port:py${python.version}-numpy \
                    port:propka \
                    port:py${python.version}-requests

depends_test-append port:py${python.version}-pandas \
                    port:py${python.version}-testfixtures

test.run            yes
test.env-append     PYTHONPATH=${destroot}${python.pkgd}
