# -*- 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        glotzerlab gsd 2.5.0 v
name                py-gsd

categories-append   science
license             BSD

python.versions     37 38 39 310

maintainers         {gmail.com:giovanni.bussi @GiovanniBussi} openmaintainer

description         GSD (General Simulation Data) is a file format specification and a library to read and write it.
long_description    ${description} \
                    The package also contains a python module that reads and writes hoomd schema gsd files with an easy to use syntax.

homepage            https://gsd.readthedocs.io/

checksums           rmd160  d554a949a626fbe651704a9306339eb4d96db973 \
                    sha256  bdaa57343bb136326071874c201b11ea3eb31ce55110d1a3a2d9de22cbedcea4 \
                    size    104699

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-cython \
                            port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-numpy

    depends_test-append     port:py${python.version}-pytest

    pre-test {
        test.env        PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run            yes
    test.cmd            py.test-${python.branch}
    test.target
}
