[issue39624] Trace greedy replaces $prefix and $exec_prefix

Ben Boeckel report at bugs.python.org
Sat Feb 15 16:23:34 EST 2020


Ben Boeckel <bugs.python at me.benboeckel.net> added the comment:

Should be replaced (using $prefix here, but equally viable for $exec_prefix). Each quoted line is a path using a raw string.

r"$prefix"
r"$prefix/foo"

and on Windows:

r"$prefix\bar"

These should *not* be replaced:

r"$prefixvar/subdir"
r"not/a/$prefix"
r"$prefix spacevar/subdir"

because here, the `$prefix` is part of another path component. This does leave the directory literally named "$prefix" in a bit of a pickle.

Like I said, it's niche, but if we're going to fix it, let's at least consider handling more cases properly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39624>
_______________________________________


More information about the Python-bugs-list mailing list