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

github.setup        python-rope rope 1.1.1
github.tarball_from archive
name                py-rope
revision            0

supported_archs     noarch
platforms           {darwin any}
license             LGPL-3+
maintainers         {reneeotten @reneeotten} openmaintainer

description         python refactoring library
long_description    Rope is a Python refactoring library that can be used \
                    with several editors and IDEs. It provides many \
                    refactoring operations as well as forms of code \
                    assistance like auto-completion and access to \
                    documentation.

checksums           rmd160  fb044e480a089a0e4566bb2d63bfe6ef2cc83af2 \
                    sha256  9c2dd15a524be66a5039fa0cb41739ae15aa8d2d90e959df83ab8afb541f479d \
                    size    274571

python.versions     27 37 38 39 310

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        github.setup    python-rope rope 0.23.0
        revision        0
        checksums       rmd160  93603a24c3b9078c707e4898dafaec0592f19e66 \
                        sha256  d179e4534e6aad7210b60f6f76f16a03ccc2eebc063d6f80661844a59a21798b \
                        size    264514
    }

    depends_build-append \
                    port:py${python.version}-setuptools

    test.run        yes
    test.env-append PYTHONPATH=${worksrcpath}

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