diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-03 13:15:04 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-08-03 13:19:47 +0100 |
commit | b09e4ca69b4dca6fd9d2e98a3722d765f86c837f (patch) | |
tree | 6b8044d29eaaf43066fce365eeb6e1f37111848c /thumbnailer | |
parent | 861a6dbea289d1ed98af1f66eb8024bc04464bd9 (diff) | |
download | gdk-pixbuf-b09e4ca69b4dca6fd9d2e98a3722d765f86c837f.tar.gz |
Move all aux scripts to their own directory
This makes it easier to find them and reference them.
Diffstat (limited to 'thumbnailer')
-rw-r--r-- | thumbnailer/gen-thumbnailer.py | 43 | ||||
-rw-r--r-- | thumbnailer/meson.build | 1 |
2 files changed, 0 insertions, 44 deletions
diff --git a/thumbnailer/gen-thumbnailer.py b/thumbnailer/gen-thumbnailer.py deleted file mode 100644 index 9994043f9..000000000 --- a/thumbnailer/gen-thumbnailer.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 - -# Ancillary wrapper around gdk-pixbuf-print-mime-types that sets up a -# modified environment in order to use the tools that we just built -# instead of the system ones - -import argparse -import os -import subprocess -import sys - -argparser = argparse.ArgumentParser(description='Compile resources') -argparser.add_argument('--printer', metavar='PATH', help='Path to gdk-pixbuf-print-mime-types') -argparser.add_argument('--pixdata', metavar='PATH', help='Path to gdk-pixbuf-pixdata') -argparser.add_argument('--loaders', metavar='PATH', help='Path to the loaders.cache file') -argparser.add_argument('--bindir', metavar='PATH', help='Path to the source directory') -argparser.add_argument('input', help='Template file') -argparser.add_argument('output', help='Output file') - -args = argparser.parse_args() - -newenv = os.environ.copy() -newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata -newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders - -cmd = args.printer - -mimetypes_out = subprocess.Popen(cmd, env=newenv, stdout=subprocess.PIPE).communicate()[0] -if not mimetypes_out: - sys.exit(1) - -infile = open(args.input, 'r') -outfile = open(args.output, 'w') - -for line in infile: - line = line.replace('@bindir@', args.bindir) - line = line.replace('@mimetypes@', mimetypes_out.decode('ascii')) - outfile.write(line) - -infile.close() -outfile.close() - -sys.exit(0) diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build index 6a2fd2ac5..e80114491 100644 --- a/thumbnailer/meson.build +++ b/thumbnailer/meson.build @@ -12,7 +12,6 @@ gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types', c_args: common_cflags, dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ]) -gen_thumbnailer = find_program('gen-thumbnailer.py') custom_target('thumbnailer', input: 'gdk-pixbuf-thumbnailer.thumbnailer.in', output: 'gdk-pixbuf-thumbnailer.thumbnailer', |