spack/lib/spack/llnl
John W. Parent f51c9fc6c3
Windows path handling: change representation for paths with spaces (#42754)
Some builds on Windows break when encountering paths with spaces. This
reencodes some paths in Windows 8.3 filename format (when on Windows):
this serves as an equivalent identifier for the file, but in a form that
does not have spaces.

8.3 filenames are also truncated in length, which could be helpful, but
that is not the primary intended purpose of using this format.

Overall

* nmake/msbuild packages do this generally for the install prefix
* curl/perl require additional modifications (as written now, each package
  may require calls to `windows_sfn` to work when the Spack
  root/install/staging prefixes contain spaces)

Some items for follow-up:

* Spack itself does not create paths with spaces "on top" of whatever
  the user configures or where it is placed (e.g. the Spack root, the
  staging directory, etc.), so it might be possible to edit some of these
  paths once and avoid a proliferation of individual `windows_sfn`
  calls in individual packages.
* This approach may result in the insertion of 8.3-style paths into
  build artifacts (on Windows), handling this may require additional
  bookkeeping (e.g. when relocating).
2024-02-23 13:30:11 -08:00
..
util Windows path handling: change representation for paths with spaces (#42754) 2024-02-23 13:30:11 -08:00
__init__.py Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
path.py Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
string.py Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00
url.py Update copyright year to 2024 (#41919) 2024-01-02 09:21:30 +01:00