# -*- 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           select 1.0

name                py-virtualenvwrapper
version             6.0.0
revision            0

supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         nomaintainer

description         Enhancements to virtualenv
long_description    virtualenvwrapper is a set of extensions to Ian \
                    Bicking's virtualenv tool. The extensions include \
                    wrappers for creating and deleting virtual \
                    environments and otherwise managing your \
                    development workflow, making it easier to work on \
                    more than one project at a time without \
                    introducing conflicts in their dependencies.

homepage            https://virtualenvwrapper.readthedocs.io/

checksums           rmd160  d0354163a6dbbd67641e1eef4d991717f57377fd \
                    sha256  4cdaca4a01bb11c3343b01439cf2d76ebe97bb28c4b9a653a9b1f1f7585cd097 \
                    size    95407

python.versions     39 310 311 312

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-pbr \
                        port:py${python.version}-setuptools \
                        port:py${python.version}-setuptools_scm \
                        port:py${python.version}-stevedore \
                        port:py${python.version}-virtualenv \
                        port:py${python.version}-virtualenv-clone

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

    depends_run-append  port:virtualenvwrapper_select

    select.group        virtualenvwrapper
    select.file         virtualenvwrapper${python.version}

    notes "
    You might need to set some variables and source the shell script. For example:

        export VIRTUALENVWRAPPER_PYTHON='${prefix}/bin/python${python.branch}'
        export VIRTUALENVWRAPPER_VIRTUALENV='${prefix}/bin/virtualenv-${python.branch}'
        export VIRTUALENVWRAPPER_VIRTUALENV_CLONE='${prefix}/bin/virtualenv-clone-${python.branch}'
        source ${prefix}/bin/virtualenvwrapper.sh-${python.branch}

    The executable is installed as\
    '${prefix}/bin/virtualenvwrapper.sh-${python.branch}'. To symlink it to\
    '${prefix}/bin/virtualenvwrapper.sh', run:

        sudo port select --set ${select.group} ${select.file}

    "
}