| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ng spaces (pythonGH-159820) The shell `python-config` located its own prefix with unquoted command substitutions, so any whitespace in the installation path made it print an empty `--prefix` and `-I/include/...`-style paths while exiting 0. - Quote the substitutions and the argument loop (POSIX `sh`, no bashisms). - Exit 1 with a message when the script's directory cannot be resolved, instead of silently printing empty paths. - Replace `sed "s#$prefix#$prefix_real#"` with a `relocate` helper using parameter expansion, so `#`, `&`, `\` and regex metacharacters in either prefix are handled literally. Same first-occurrence semantics. - Add `test_python_config_sh_prefix_with_spaces`: runs the generated script from `…/path with spaces/bin/` and checks `--prefix`, `--exec-prefix`, `--includes` and empty stderr (cherry picked from commit 3e13407) Co-authored-by: Itamar Oren <itamarost@gmail.com>
| Back | FazBrowse Home | New Git URL |
The shell python-config located its own prefix with unquoted command
substitutions, so any whitespace in the installation path made it print an
empty --prefix and -I/include/...-style paths while exiting 0.
instead of silently printing empty paths.
parameter expansion, so #, &, \ and regex metacharacters in either
prefix are handled literally. Same first-occurrence semantics.
generated script from …/path with spaces/bin/ and checks --prefix,
--exec-prefix, --includes and empty stderr
(cherry picked from commit 3e13407)
Co-authored-by: Itamar Oren itamarost@gmail.com