gst/: fix headers

Original commit message from CVS:
2004-09-13  Thomas Vander Stichele  <thomas at apestaart dot org>

* 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
This commit is contained in:
Thomas Vander Stichele 2004-09-13 07:31:31 +00:00
parent 02f72cd028
commit 828449319c
7 changed files with 58 additions and 32 deletions

View file

@ -1,3 +1,14 @@
2004-09-13 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <johan@gnome.org> 2004-08-30 Johan Dahlin <johan@gnome.org>
* gst/gst.override (_wrap_gst_structure_ass_subscript): Some more * gst/gst.override (_wrap_gst_structure_ass_subscript): Some more

2
common

@ -1 +1 @@
Subproject commit 14f44a56213628dcfdf8ca77159ba0f9622f6102 Subproject commit 5ec931d243c53ddda5b2cbb9a2c21ce89747bcb4

View file

@ -1,3 +1,5 @@
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# #
# gst-python # gst-python
# Copyright (C) 2002 David I. Lehn # Copyright (C) 2002 David I. Lehn
@ -18,7 +20,6 @@
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
# #
# Author: David I. Lehn <dlehn@users.sourceforge.net> # Author: David I. Lehn <dlehn@users.sourceforge.net>
#
try: try:
import ltihooks import ltihooks

View file

@ -1,3 +1,5 @@
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# #
# gst-python # gst-python
# Copyright (C) 2002 David I. Lehn # Copyright (C) 2002 David I. Lehn
@ -19,7 +21,6 @@
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
# #
# Author: David I. Lehn <dlehn@users.sourceforge.net> # Author: David I. Lehn <dlehn@users.sourceforge.net>
#
from argtypes import UInt64Arg, Int64Arg, PointerArg, ArgMatcher, ArgType, matcher from argtypes import UInt64Arg, Int64Arg, PointerArg, ArgMatcher, ArgType, matcher

View file

@ -186,15 +186,18 @@ _wrap_gst_pad_tp_repr (PyGObject *self)
{ {
char *buf; char *buf;
PyObject *retval; PyObject *retval;
GstPad *pad;
GstElement *parent;
buf = g_strdup_printf("<GstPad (%s) at %lx>", buf = g_strdup_printf ("<GstPad (%s:%s) at %lx>",
gst_pad_get_name(GST_PAD(self->obj)), gst_element_get_name (parent),
(long)self->obj); gst_pad_get_name (pad), (long) self->obj);
retval = PyString_FromString(buf); retval = PyString_FromString(buf);
g_free(buf); g_free(buf);
return retval; return retval;
} }
%% %%
override gst_pad_query kwargs override gst_pad_query kwargs
static PyObject * static PyObject *

View file

@ -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 # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public # modify it under the terms of the GNU Library General Public
@ -15,6 +17,5 @@
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
# #
# Author: David I. Lehn <dlehn@users.sourceforge.net> # Author: David I. Lehn <dlehn@users.sourceforge.net>
#
from gst import * from gst import *

View file

@ -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. # ltihooks.py: python import hooks that understand libtool libraries.
# Copyright (C) 2000 James Henstridge. # Copyright (C) 2000 James Henstridge.
# #
@ -21,33 +23,40 @@ import os, ihooks
class LibtoolHooks(ihooks.Hooks): class LibtoolHooks(ihooks.Hooks):
def get_suffixes(self): def get_suffixes(self):
"""Like normal get_suffixes, but adds .la suffixes to list""" """Like normal get_suffixes, but adds .la suffixes to list"""
ret = ihooks.Hooks.get_suffixes(self) ret = ihooks.Hooks.get_suffixes(self)
ret.insert(0, ('module.la', 'rb', 3)) ret.insert(0, ('module.la', 'rb', 3))
ret.insert(0, ('.la', 'rb', 3)) ret.insert(0, ('.la', 'rb', 3))
return ret return ret
def load_dynamic(self, name, filename, file=None): def load_dynamic(self, name, filename, file=None):
"""Like normal load_dynamic, but treat .la files specially""" """Like normal load_dynamic, but treat .la files specially"""
if len(filename) > 3 and filename[-3:] == '.la': if len(filename) > 3 and filename[-3:] == '.la':
fp = open(filename, 'r') fp = open(filename, 'r')
dlname = '' dlname = ''
installed = 1 installed = 1
line = fp.readline() line = fp.readline()
while line: while line:
if len(line) > 7 and line[:7] == 'dlname=': # dlname: the name that we can dlopen
dlname = line[8:-2] if len(line) > 7 and line[:7] == 'dlname=':
elif len(line) > 10 and line[:10] == 'installed=': dlname = line[8:-2]
installed = line[10:-1] == 'yes' # installed: whether it's already installed
line = fp.readline() elif len(line) > 10 and line[:10] == 'installed=':
fp.close() installed = line[10:-1] == 'yes'
if dlname: line = fp.readline()
if installed: fp.close()
filename = os.path.join(os.path.dirname(filename), if dlname:
dlname) if installed:
else: filename = os.path.join(os.path.dirname(filename),
filename = os.path.join(os.path.dirname(filename), dlname)
'.libs', dlname) else:
return ihooks.Hooks.load_dynamic(self, name, filename, file) # 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 = ihooks.ModuleImporter()
importer.set_hooks(LibtoolHooks()) importer.set_hooks(LibtoolHooks())