# -*- 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-virtualenv-clone
version             0.5.7
revision            2

categories-append   devel
maintainers         nomaintainer
supported_archs     noarch
platforms           {darwin any}
license             MIT

description         script to clone virtualenvs
long_description    A script for cloning a non-relocatable virtualenv.

homepage            https://github.com/edwardgeorge/${python.rootname}/

checksums           rmd160  885b90024880e4cd45410caeab0014d5a160d14a \
                    sha256  418ee935c36152f8f153c79824bb93eaf6f0f7984bae31d3f48f350b9183501a \
                    size    6454

python.versions     310 311 312 313 314

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

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

    depends_run-append  port:virtualenv-clone_select

    select.group        virtualenv-clone
    select.file         virtualenv-clone${python.version}

    notes-append "
    The executable is installed as\
    '${prefix}/bin/virtualenv-clone-${python.branch}'. To symlink it to\
    '${prefix}/bin/virtualenv-clone', run:

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

}
