aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-11-03 18:37:23 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2014-11-03 18:37:23 +0200
commita500c6cfa885ab9da7527d6f983f162f31e47710 (patch)
treef8044d17e42f53d5da52d9470fe9432f5f8132d2 /interpreter.py
parentd767bcf86db95d5d9f17306b3c17d56f93b0e873 (diff)
downloadmeson-a500c6cfa885ab9da7527d6f983f162f31e47710.zip
meson-a500c6cfa885ab9da7527d6f983f162f31e47710.tar.gz
meson-a500c6cfa885ab9da7527d6f983f162f31e47710.tar.bz2
Can install data files from subdirectories.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/interpreter.py b/interpreter.py
index 1ca1713..d01ebc0 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -301,9 +301,10 @@ class Headers(InterpreterObject):
return self.custom_install_dir
class Data(InterpreterObject):
- def __init__(self, subdir, sources, kwargs):
+ def __init__(self, source_subdir, subdir, sources, kwargs):
InterpreterObject.__init__(self)
- self.subdir = subdir
+ self.source_subdir = source_subdir
+ self.install_subdir = subdir
self.sources = sources
kwsource = kwargs.get('sources', [])
if not isinstance(kwsource, list):
@@ -313,8 +314,11 @@ class Data(InterpreterObject):
if self.custom_install_dir is not None and not isinstance(self.custom_install_dir, str):
raise InterpreterException('Custom_install_dir must be a string.')
- def get_subdir(self):
- return self.subdir
+ def get_install_subdir(self):
+ return self.install_subdir
+
+ def get_source_subdir(self):
+ return self.source_subdir
def get_sources(self):
return self.sources
@@ -1210,7 +1214,7 @@ class Interpreter():
for a in args:
if not isinstance(a, str):
raise InvalidArguments('Argument %s is not a string.' % str(a))
- data = Data(args[0], args[1:], kwargs)
+ data = Data(self.subdir, args[0], args[1:], kwargs)
self.build.data.append(data)
return data