Surgical strike complete. Data has been extracted from interpreter and unit tests pass.

pull/15/head
Jussi Pakkanen 11 years ago
parent 08622ae644
commit a9eb2e7317
  1. 11
      build.py

@ -13,8 +13,9 @@
# limitations under the License. # limitations under the License.
import coredata import coredata
import copy, os
import environment import environment
import dependencies
import copy, os
class InvalidArguments(coredata.MesonException): class InvalidArguments(coredata.MesonException):
pass pass
@ -112,6 +113,9 @@ class BuildTarget():
if not isinstance(sources, list): if not isinstance(sources, list):
sources = [sources] sources = [sources]
for s in sources: for s in sources:
# Holder unpacking. Ugly.
if hasattr(s, 'glist'):
s = s.glist
if isinstance(s, str): if isinstance(s, str):
self.sources.append(s) self.sources.append(s)
elif isinstance(s, GeneratedList): elif isinstance(s, GeneratedList):
@ -205,8 +209,9 @@ class BuildTarget():
def add_external_deps(self, deps): def add_external_deps(self, deps):
for dep in deps: for dep in deps:
if not isinstance(dep, dependencies.Dependency) and\ if hasattr(dep, 'el'):
not isinstance(dep, ExternalLibraryHolder): dep = dep.el
if not isinstance(dep, dependencies.Dependency):
raise InvalidArguments('Argument is not an external dependency') raise InvalidArguments('Argument is not an external dependency')
self.external_deps.append(dep) self.external_deps.append(dep)
if isinstance(dep, dependencies.Dependency): if isinstance(dep, dependencies.Dependency):

Loading…
Cancel
Save