diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-05 05:18:08 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-18 02:38:54 +0530 |
commit | b3d5db49e8a521b3a9545987546dec02babd88df (patch) | |
tree | 6263e5fbdf13de2283aa79ba99928cab25760206 /mesonbuild/mintro.py | |
parent | 8e366976177d9b0bf1753d06fb09c6659d3c435f (diff) | |
download | meson-b3d5db49e8a521b3a9545987546dec02babd88df.zip meson-b3d5db49e8a521b3a9545987546dec02babd88df.tar.gz meson-b3d5db49e8a521b3a9545987546dec02babd88df.tar.bz2 |
mesonintrospect: Normalize install_filename in the output
Without this, we can output a mixture of '/' and '\' on platforms where
os.path.sep is '\' and prefix or outdir uses '/'. Let's always return
the path in the format of the platform we're running on.
This is needed to make the test_install_introspection() unittest work
properly on Windows.
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r-- | mesonbuild/mintro.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 2807230..6eab76e 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -23,6 +23,7 @@ import json, pickle from . import coredata, build import argparse import sys, os +import pathlib parser = argparse.ArgumentParser() parser.add_argument('--targets', action='store_true', dest='list_targets', default=False, @@ -56,7 +57,9 @@ def determine_installed_path(target, installdata): fname = i[0] outdir = i[1] outname = os.path.join(installdata.prefix, outdir, os.path.split(fname)[-1]) - return outname + # Normalize the path by using os.path.sep consistently, etc. + # Does not change the effective path. + return str(pathlib.PurePath(outname)) def list_installed(installdata): |