diff options
| author | Matthias Klumpp <matthias@tenstral.net> | 2018-01-07 18:14:51 +0100 |
|---|---|---|
| committer | Matthias Klumpp <matthias@tenstral.net> | 2018-01-07 18:23:56 +0100 |
| commit | 0da6d891ac92c381461b75ee2b59fd7415bd8a8d (patch) | |
| tree | 026ce468f4f895213864ced3014f21dc84e5e2ad | |
| parent | fd66692f73efb80783172b9d346ae4a5b6b6fa6d (diff) | |
| download | meson-0da6d891ac92c381461b75ee2b59fd7415bd8a8d.tar.gz | |
Allow subproject dirs in subdirectories in the source tree again
The previous change disallowed any subdirectories for subproject dirs,
and therefore broke a couple of projects making use of that.
This change still prevents people from setting subproject dirs that are
not in the project's source tree, while allowing to specify any path
within the project's directory again.
Resolves: #2719
| -rw-r--r-- | mesonbuild/interpreter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 29b4033d6..f47291016 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1883,8 +1883,8 @@ to directly access options of other subprojects.''') raise InvalidCode('Second call to project().') if not self.is_subproject() and 'subproject_dir' in kwargs: spdirname = kwargs['subproject_dir'] - if '/' in spdirname or '\\' in spdirname: - raise InterpreterException('Subproject_dir must not contain a path segment.') + if os.path.isabs(spdirname): + raise InterpreterException('Subproject_dir must not be an absolute path.') if spdirname.startswith('.'): raise InterpreterException('Subproject_dir must not begin with a period.') self.subproject_dir = spdirname |
