Added hack to clear out text seeping in from the surrounding Make when building a Debian package.

pull/15/head
Jussi Pakkanen 12 years ago
parent 41e89c5cb5
commit aa8d48bdb8
  1. 9
      dependencies.py

@ -428,9 +428,16 @@ class GnuStepDependency(Dependency):
liberr = liberr.decode()
if fp.returncode != 0:
raise DependencyException('Error getting objc-lib flags: %s %s' % (libtxt, liberr))
self.libs = libtxt.split()
self.libs = self.weird_filter(libtxt.split())
print('Dependency GnuStep found: YES')
def weird_filter(self, elems):
"""When building packages, the output of the enclosing Make
is sometimes mixed among the subprocess output. I have no idea
why. As a hack filter out everything that is not a flag."""
return [e for e in elems if e.startswith('-')]
def filter_flags(self, flags):
"""gnustep-config returns a bunch of garbage flags such
as -O2 and so on. Drop everything that is not needed."""

Loading…
Cancel
Save