# -*- 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            justinmayer virtualfish 2.5.9
github.tarball_from     archive
revision                0
name                    py-virtualfish

supported_archs         noarch
platforms               {darwin any}
license                 MIT
maintainers             nomaintainer

description             A Fish wrapper for Ian Bicking\'s virtualenv
long_description        A Fish Shell wrapper for Ian Bicking's virtualenv, somewhat\
                        loosely based on Doug Hellman's virtualenvwrapper for\
                        Bourne-compatible shells.

checksums               rmd160  4561aa2fe2078d27906cf9eaf1cea940351b0a46 \
                        sha256  ec969e614167c4b1ca415c4409390ca94edfdb61f4b473b6c1390caa9625c9a0 \
                        size    36547

python.versions         310 311 312 313 314
python.pep517_backend   poetry

if {${name} ne ${subport}} {
    # These are in pyproject.toml order
    depends_lib-append  port:py${python.version}-packaging \
                        port:py${python.version}-pkgconfig \
                        port:py${python.version}-psutil \
                        port:py${python.version}-virtualenv \
                        port:fish

    post-destroot {
        xinstall {*}[glob ${worksrcpath}/virtualfish/*.fish] ${destroot}${python.pkgd}/virtualfish/

        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE \
            CONTRIBUTING.md CHANGELOG.md ${destroot}${docdir}
    }

    notes "
        Be sure to check virtualfish install notes:
            https://virtualfish.readthedocs.io/en/latest/install.html

        At this point you basically need to:
            - edit ~/.config/fish/config.fish, adding a line that reads
                eval (python -m virtualfish)
            - add virtualfish to your prompt, see virtualfish install notes
            - start using virtualfish: vf new myvirtualenv; which python
            "
}
