[library-web] deal with tarballs containing both autotools and meson
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] deal with tarballs containing both autotools and meson
- Date: Sat, 13 Jan 2018 19:17:17 +0000 (UTC)
commit 154cdcef6105c8cbc32e3cc0ae4bbb81ed88406f
Author: Frédéric Péters <fpeters 0d be>
Date: Sat Jan 13 20:16:46 2018 +0100
deal with tarballs containing both autotools and meson
src/lgo.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/lgo.py b/src/lgo.py
index b2f11a6..b26d10f 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -697,9 +697,11 @@ class Lgo(App):
extraction_happened = False
regex_gdu = re.compile(r'include.*gnome-doc-utils.make', re.DOTALL)
+ found_meson = False
+ found_autotools = False
for tarinfo in tar:
doc = None
- if os.path.split(tarinfo.name)[-1] in ('Makefile.am', 'GNUmakefile.am'):
+ if os.path.split(tarinfo.name)[-1] in ('Makefile.am', 'GNUmakefile.am') and not found_meson:
fd = tar.extractfile(tarinfo)
makefile_am = fd.read()
# merge lines continued with \
@@ -745,13 +747,19 @@ class Lgo(App):
logging.debug('skipping because it has $( in its modulename')
continue
- elif os.path.split(tarinfo.name)[-1] == 'meson.build':
+ found_autotools = True
+
+ elif os.path.split(tarinfo.name)[-1] == 'meson.build' and not found_autotools:
fd = tar.extractfile(tarinfo)
meson_build = fd.read()
if 'gnome.gtkdoc' in meson_build:
logging.debug('found usage of gtk-doc in %s' % tarinfo.name)
doc = GtkDocModule.create_from_tar(tar, tarinfo,
meson_build=meson_build, nightly=nightly)
+ else:
+ continue
+
+ found_meson = True
else:
for more_doc in more_tarball_docs[:]:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]