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

name                py-xdis
version             5.0.8
# Note if you update this, make sure it supports the newest versions
# of pythonXY in magics.py
platforms           darwin
supported_archs     noarch
license             GPL-2
maintainers         {khindenburg @kurthindenburg} openmaintainer

description         Python cross-version byte-code disassembler and marshal routines
long_description \
    The Python `dis` module allows you to disassemble bytecode from the same \
    version of Python that you are running on. \
    This package can "marshal load" Python bytecodes \
    from different versions of Python. The command-line routine \
    *pydisasm* will show disassembly output using Python 3.5 disassembly \
    conventions.  This is a direct port of a C++ routine by Jonathan Goodman \
    (NYU) called ACOR that estimates the autocorrelation time \
    of time series data very quickly.

homepage            https://github.com/rocky/python-xdis

checksums           rmd160  020ebda09367fcc13a8843e54722fbe85baa1373 \
                    sha256  532780af6841bee79e74cb4719e72077192eaf63946cfb4a570c124863a94001 \
                    size    235039

python.versions     27 35 36 37 38 39

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

    post-patch {
        reinplace "s|PYTHON ?= python|PYTHON ?= ${python.bin}|g" ${worksrcpath}/test/Makefile
    }

    depends_test-append port:py${python.version}-pytest

    test.run        yes
    test.dir        ${build.dir}/test
    test.cmd        make
    test.target     check-full
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
