aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-02-21 13:39:52 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2018-02-21 23:58:14 +0200
commitcf98f5e3705603ae21bef9b0a577bcd001a8c92e (patch)
tree0570e0fcc4d15e6f8b155844ad11e4676f010198 /mesonbuild
parent845dbfcbbc40b0060b1ed7d7df0431c5f4a11497 (diff)
downloadmeson-cf98f5e3705603ae21bef9b0a577bcd001a8c92e.zip
meson-cf98f5e3705603ae21bef9b0a577bcd001a8c92e.tar.gz
meson-cf98f5e3705603ae21bef9b0a577bcd001a8c92e.tar.bz2
Enable searching system crossfile locations on more platforms
There's no reason not to also look in these places on Cygwin or OSX. Don't do this on Windows, as these paths aren't meaningful there. Move test_cross_file_system_paths from LinuxlikeTests to AllPlatformTests.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/coredata.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index f87e62c..bae207b 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -222,17 +222,17 @@ class CoreData:
(after resolving variables and ~), return that absolute path. Next,
check if the file is relative to the current source dir. If the path
still isn't resolved do the following:
- Linux + BSD:
+ Windows:
+ - Error
+ *:
- $XDG_DATA_HOME/meson/cross (or ~/.local/share/meson/cross if
undefined)
- $XDG_DATA_DIRS/meson/cross (or
/usr/local/share/meson/cross:/usr/share/meson/cross if undefined)
- Error
- *:
- - Error
- BSD follows the Linux path and will honor XDG_* if set. This simplifies
- the implementation somewhat, especially since most BSD users wont set
- those environment variables.
+
+ Non-Windows follows the Linux path and will honor XDG_* if set. This
+ simplifies the implementation somewhat.
"""
if filename is None:
return None
@@ -242,7 +242,7 @@ class CoreData:
path_to_try = os.path.abspath(filename)
if os.path.exists(path_to_try):
return path_to_try
- if sys.platform == 'linux' or 'bsd' in sys.platform.lower():
+ if sys.platform != 'win32':
paths = [
os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')