From 828449319c965133c7fdac2c72943f2be5055982 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 13 Sep 2004 07:31:31 +0000 Subject: [PATCH] gst/: fix headers Original commit message from CVS: 2004-09-13 Thomas Vander Stichele * gst/__init__.py: * gst/gstreamer.py: * gst/arg-types.py: fix headers * gst/gst.override: change GstPad repr * gst/ltihooks.py: fix distcheck for uninstalled by only adding .libs when needed --- ChangeLog | 11 +++++++++ common | 2 +- gst/__init__.py | 3 ++- gst/arg-types.py | 3 ++- gst/gst.override | 9 +++++--- gst/gstreamer.py | 3 ++- gst/ltihooks.py | 59 ++++++++++++++++++++++++++++-------------------- 7 files changed, 58 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index adbbfedec0..adf2f5d327 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-09-13 Thomas Vander Stichele + + * gst/__init__.py: + * gst/gstreamer.py: + * gst/arg-types.py: + fix headers + * gst/gst.override: + change GstPad repr + * gst/ltihooks.py: + fix distcheck for uninstalled by only adding .libs when needed + 2004-08-30 Johan Dahlin * gst/gst.override (_wrap_gst_structure_ass_subscript): Some more diff --git a/common b/common index 14f44a5621..5ec931d243 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 14f44a56213628dcfdf8ca77159ba0f9622f6102 +Subproject commit 5ec931d243c53ddda5b2cbb9a2c21ce89747bcb4 diff --git a/gst/__init__.py b/gst/__init__.py index 6c82449e7f..fa98961cb8 100644 --- a/gst/__init__.py +++ b/gst/__init__.py @@ -1,3 +1,5 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 # # gst-python # Copyright (C) 2002 David I. Lehn @@ -18,7 +20,6 @@ # Boston, MA 02111-1307, USA. # # Author: David I. Lehn -# try: import ltihooks diff --git a/gst/arg-types.py b/gst/arg-types.py index 3fc393b32d..47f7a7ca90 100644 --- a/gst/arg-types.py +++ b/gst/arg-types.py @@ -1,3 +1,5 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 # # gst-python # Copyright (C) 2002 David I. Lehn @@ -19,7 +21,6 @@ # Boston, MA 02111-1307, USA. # # Author: David I. Lehn -# from argtypes import UInt64Arg, Int64Arg, PointerArg, ArgMatcher, ArgType, matcher diff --git a/gst/gst.override b/gst/gst.override index a2346fb695..575f805702 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -186,15 +186,18 @@ _wrap_gst_pad_tp_repr (PyGObject *self) { char *buf; PyObject *retval; + GstPad *pad; + GstElement *parent; - buf = g_strdup_printf("", - gst_pad_get_name(GST_PAD(self->obj)), - (long)self->obj); + buf = g_strdup_printf ("", + gst_element_get_name (parent), + gst_pad_get_name (pad), (long) self->obj); retval = PyString_FromString(buf); g_free(buf); return retval; } + %% override gst_pad_query kwargs static PyObject * diff --git a/gst/gstreamer.py b/gst/gstreamer.py index a252e51ba9..b239ea47a7 100644 --- a/gst/gstreamer.py +++ b/gst/gstreamer.py @@ -1,3 +1,5 @@ +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public @@ -15,6 +17,5 @@ # Boston, MA 02111-1307, USA. # # Author: David I. Lehn -# from gst import * diff --git a/gst/ltihooks.py b/gst/ltihooks.py index 7086365dfe..2efdd53d31 100644 --- a/gst/ltihooks.py +++ b/gst/ltihooks.py @@ -1,4 +1,6 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- +# -*- Mode: Python -*- +# vi:si:et:sw=4:sts=4:ts=4 + # ltihooks.py: python import hooks that understand libtool libraries. # Copyright (C) 2000 James Henstridge. # @@ -21,33 +23,40 @@ import os, ihooks class LibtoolHooks(ihooks.Hooks): def get_suffixes(self): """Like normal get_suffixes, but adds .la suffixes to list""" - ret = ihooks.Hooks.get_suffixes(self) - ret.insert(0, ('module.la', 'rb', 3)) - ret.insert(0, ('.la', 'rb', 3)) - return ret + ret = ihooks.Hooks.get_suffixes(self) + ret.insert(0, ('module.la', 'rb', 3)) + ret.insert(0, ('.la', 'rb', 3)) + return ret def load_dynamic(self, name, filename, file=None): """Like normal load_dynamic, but treat .la files specially""" - if len(filename) > 3 and filename[-3:] == '.la': - fp = open(filename, 'r') - dlname = '' - installed = 1 - line = fp.readline() - while line: - if len(line) > 7 and line[:7] == 'dlname=': - dlname = line[8:-2] - elif len(line) > 10 and line[:10] == 'installed=': - installed = line[10:-1] == 'yes' - line = fp.readline() - fp.close() - if dlname: - if installed: - filename = os.path.join(os.path.dirname(filename), - dlname) - else: - filename = os.path.join(os.path.dirname(filename), - '.libs', dlname) - return ihooks.Hooks.load_dynamic(self, name, filename, file) + if len(filename) > 3 and filename[-3:] == '.la': + fp = open(filename, 'r') + dlname = '' + installed = 1 + line = fp.readline() + while line: + # dlname: the name that we can dlopen + if len(line) > 7 and line[:7] == 'dlname=': + dlname = line[8:-2] + # installed: whether it's already installed + elif len(line) > 10 and line[:10] == 'installed=': + installed = line[10:-1] == 'yes' + line = fp.readline() + fp.close() + if dlname: + if installed: + filename = os.path.join(os.path.dirname(filename), + dlname) + else: + # if .libs already there, don't need to add it again + if os.path.dirname(filename).endswith('.libs'): + filename = os.path.join(os.path.dirname(filename), + dlname) + else: + filename = os.path.join(os.path.dirname(filename), + '.libs', dlname) + return ihooks.Hooks.load_dynamic(self, name, filename, file) importer = ihooks.ModuleImporter() importer.set_hooks(LibtoolHooks())