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

name                py-astropy
version             6.1.4
revision            0

checksums           rmd160  c2851fcbc4cc47cbcba94c14f8b34448ced1d66e \
                    sha256  361558e2b093a99bebe69f1fd47fac86a192607a4c16ed39ba0a800b2ab60c34 \
                    size    7057481

maintainers         {mps @Schamschula} openmaintainer
categories-append   science
description         A Community Python Library for Astronomy
long_description    The Astropy project is a common effort to develop \
                    a single core package for Astronomy.
license             BSD

homepage            https://www.astropy.org

python.versions     38 39 310 311 312

# see https://trac.macports.org/ticket/48941
compiler.blacklist  {*llvm-gcc42}

if {${name} ne ${subport}} {
    platforms       {darwin >= 11}

    depends_build-append \
                    port:pkgconfig \
                    port:py${python.version}-cython \
                    port:py${python.version}-extension-helpers \
                    port:py${python.version}-jinja2 \
                    port:py${python.version}-setuptools_scm \
                    port:py${python.version}-toml

    depends_lib-append  \
                    port:cfitsio \
                    port:erfa \
                    port:expat \
                    port:py${python.version}-colorlog \
                    port:py${python.version}-h5py \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-numpy \
                    port:py${python.version}-packaging \
                    port:py${python.version}-pandas \
                    port:py${python.version}-pyerfa \
                    port:py${python.version}-pyobjc \
                    port:py${python.version}-pythran \
                    port:py${python.version}-scipy \
                    port:py${python.version}-yaml \
                    port:wcslib

    if {${python.version} >= 39} {
        python.pep517   yes

        depends_lib-append  \
                    port:py${python.version}-astropy-iers-data

        variant all description {Full install} {
            depends_lib-append  \
                    port:pre-commit \
                    port:py${python.version}-asdf-astropy \
                    port:py${python.version}-beautifulsoup4 \
                    port:py${python.version}-bleach \
                    port:py${python.version}-bottleneck \
                    port:py${python.version}-certifi \
                    port:py${python.version}-dask \
                    port:py${python.version}-fsspec \
                    port:py${python.version}-html5lib \
                    port:py${python.version}-ipython \
                    port:py${python.version}-jplephem \
                    port:py${python.version}-mpmath \
                    port:py${python.version}-pyarrow \
                    port:py${python.version}-pytest \
                    port:py${python.version}-s3fs \
                    port:py${python.version}-sortedcontainers \
                    port:py${python.version}-typing_extensions \
                    port:py${python.version}-tz
       }
 
       patchfiles  patch-pyproject.toml.6.1.diff
   }

    if {${python.version} == 38} {
        version     5.2.2
        revision    0

        checksums   rmd160  4dcc891fdfd66aa7233970dab9f76d80242302e4 \
                    sha256  e6a9e34716bda5945788353c63f0644721ee7e5447d16b1cdcb58c48a96b0d9c \
                    size    8288550

        patchfiles  patch-pyproject.toml.5.2.diff
    }

    dist_subdir     ${name}/${version}
    distname        astropy-${version}
}
