[glib] build: Drop data-to-c.pl in favour of data-to-c.py



commit 1897e66dce271027512497bd9db70f155d9bf9d7
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Nov 10 00:54:36 2017 +0000

    build: Drop data-to-c.pl in favour of data-to-c.py
    
    The Python version was added for the Meson build, but we might as well
    use it from autotools too, since it does exactly the same thing as the
    Perl version (modulo not including a trailing linebreak, but that
    doesn’t matter).
    
    Works fine with Python 2.7 or Python 3.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790147

 gio/Makefile.am  |    6 +++---
 gio/data-to-c.pl |   37 -------------------------------------
 gio/data-to-c.py |    2 +-
 3 files changed, 4 insertions(+), 41 deletions(-)
---
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 1ffe0cc..0cfda50 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -762,7 +762,7 @@ BUILT_SOURCES +=            \
        $(NULL)
 
 EXTRA_DIST +=                  \
-       data-to-c.pl            \
+       data-to-c.py            \
        gioenumtypes.h.template \
        gioenumtypes.c.template \
        gio.rc.in               \
@@ -822,8 +822,8 @@ gio_querymodules_LDADD       = libgio-2.0.la                \
        $(top_builddir)/glib/libglib-2.0.la             \
        $(NULL)
 
-gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
-       $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv 
$@.tmp $@
+gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
+       $(AM_V_GEN) $(srcdir)/data-to-c.py $(top_srcdir)/glib/gconstructor.h gconstructor_code $@
 
 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
 glib_compile_schemas_SOURCES = \
diff --git a/gio/data-to-c.py b/gio/data-to-c.py
old mode 100644
new mode 100755
index 7a8d8a8..f226220
--- a/gio/data-to-c.py
+++ b/gio/data-to-c.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 import sys
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]