]> granicus.if.org Git - python/commit
[3.6] closes bpo-22140: Prevent double substitution of prefix in python-config.sh...
authorBenjamin Peterson <benjamin@python.org>
Thu, 28 Sep 2017 03:27:41 +0000 (20:27 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2017 03:27:41 +0000 (20:27 -0700)
commit68b131d5b674549bb637b366730497714ad11328
treeabf7ac6778d74886a0308a2a8a6ac8194175ee81
parent084f80b82c564c8a3cef26fc6e56da188a379be2
[3.6] closes bpo-22140: Prevent double substitution of prefix in python-config.sh (GH-3769) (#3793)

Fix the logic in python-config.sh to avoid attempting to substitute
prefix in a variable that might have already been subject to
substitution. This e.g. happened if @exec_prefix@ was defined as
"${prefix}" (which is the default of the configure script) -- in which
case the exec_prefix_build variable was initialized with
already-subtituted prefix, and then another round of substitution was
performed which might have resulted in duplicate prefix.

To avoid that, rename the variables so that the variables matching
likely configure names (prefix, exec_prefix) retain their original
values and a '_real' suffix is used for the real values of prefix.

Furthermore, replace the unnecessary prefix and exec_prefix
substitutions with direct prefix_real references since the sed
always replaced the whole string anyway by design.
(cherry picked from commit 14086cfc5eed8c5e78342d79e5db87a135d75fa8)
Misc/NEWS.d/next/Build/2017-09-26-22-39-58.bpo-22140.ZRf7Wn.rst [new file with mode: 0644]
Misc/python-config.sh.in