# -*- 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-nmrglue
version             0.11
revision            0

categories-append   science
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         A module for working with NMR data in Python
long_description    nmrglue is a module for working with NMR data in Python. \
                    When used with the Numpy, Scipy, and matplotlib packages \
                    nmrglue provides a robust interpreted environment for processing, \
                    analysing, and inspecting NMR data.

homepage            https://nmrglue.com

checksums           rmd160  d3d361f1ca9f62ddf497f91c0d38f635f7037aec \
                    sha256  9e740a02d34ce5df9eb0390274c6a5f37b4837d59139512a3dd169106a8e3fe1 \
                    size    205874

python.versions     310 311 312 313

conflicts           ${subport}-devel

foreach pver [list {*}${python.versions} ""] {
    subport py${pver}-nmrglue-devel {
        PortGroup       github 1.0

        github.setup    jjhelmus nmrglue 1f575edf0a5cfe089b6
        github.tarball_from archive
        version         20250920-[string range ${github.version} 0 7]
        revision        0
        checksums       rmd160  7a019dd7e5395af8ad8d04f7c3e40e2296ea8217 \
                        sha256  c643c2be84f202cec21eb931f2c850c832f4cd51fae2734fd2abab61d284a619 \
                        size    14932189

        conflicts       py${pver}-nmrglue

        if {${pver} ne ""} {
            livecheck.type  none
        } else {
            PortGroup   stub 1.0
        }
    }
}

if {${subport} ni [list ${name} ${name}-devel]} {
    depends_lib-append \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy

    test.run        yes
    test.args       --pyargs nmrglue

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} TODO.txt LICENSE.txt INSTALL.txt \
            README.rst ${destroot}${prefix}/share/doc/${subport}
    }
}
