Peter Dyballa - 2020-11-27

Sorry, I made a mistake: The build script (in TCL) of the MacPorts package manager seems to be the cause for the faulty path to Python 3:

reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${python.prefix}/bin/dblatex
reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${destroot}${python.prefix}/bin/dblatex

fs-traverse f ${destroot}${python.prefix}/share {
    if {[file isfile $f]} {
        set f [string range $f [string length ${destroot}${python.prefix}/share/] end]
        file mkdir [file dirname ${destroot}${prefix}/share/$f]
        ln -s ${python.prefix}/share/$f ${destroot}${prefix}/share/$f
    }
}
if {![variant_isset mactex]} {
    set dblatex.texmflocal ${texlive_texmflocal}
    set dblatex.bin ${prefix}/bin
} else {
    set dblatex.bin ${dblatex.mactex_bin}
}
file mkdir ${destroot}${dblatex.texmflocal}/tex/latex/dblatex
fs-traverse f ${destroot}${python.prefix}/share/dblatex/latex {
    if {[file isfile $f]} {
        if {[catch {exec ${dblatex.bin}/kpsewhich -a [file tail $f]} result]} {
            set f [string range $f [string length ${destroot}${python.prefix}/share/dblatex/latex/] end]
            file mkdir [file dirname ${destroot}${dblatex.texmflocal}/tex/latex/dblatex/$f]
            ln -s ${python.prefix}/share/dblatex/latex/$f ${destroot}${dblatex.texmflocal}/tex/latex/dblatex/$f
        }
    }
}
ln -s ${python.prefix}/bin/dblatex ${destroot}${prefix}/bin/

}

I could see that the built original scripts/dblatex starts with '#! /usr/bin/env python3', it is the installed file "${destroot}${prefix}/bin/dblatex" that has the wrong path. Obviously the value of "${python.bin}" is wrong in MacPorts' TCL build script. And this script was changed by me to adapt it from Python 2 to Python 3.