Commit df4040a1 authored by Thibault Saunier's avatar Thibault Saunier
Browse files

bindings: Start implementing overrides for python

parent 3afd8fb8
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
SUBDIRS = ges tests tools common m4 pkgconfig docs
SUBDIRS = ges tests tools common m4 pkgconfig docs bindings
DIST_SUBDIRS = $(SUBDIRS)
......
SUBDIRS =
if WITH_PYTHON
SUBDIRS += python
endif
SUBDIRS = gi
if BUILD_EXAMPLES
SUBDIRS += examples
endif
#!/usr/bin/env python
#
# __init__.py
#
# Copyright (C) 2012 Thibault Saunier <thibaul.saunier@collabora.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# GES.py
#
# Copyright (C) 2012 Thibault Saunier <thibault.saunier@collabora.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
import sys
from ..overrides import override
from ..importer import modules
if sys.version_info >= (3, 0):
_basestring = str
_callable = lambda c: hasattr(c, '__call__')
else:
_basestring = basestring
_callable = callable
GES = modules['GES']._introspection_module
__all__ = []
if GES._version == '0.10':
import warnings
warn_msg = "You have imported the GES 0.10 module. Because GES 0.10 \
was not designed for use with introspection some of the \
interfaces and API will fail. As such this is not supported \
by the GStreamer development team and we encourage you to \
port your app to GES 1 or greater. static python bindings is the recomended \
python module to use with GES 0.10"
warnings.warn(warn_msg, RuntimeWarning)
try:
from gi.repository import Gst
Gst
except:
raise RuntimeError("GSt couldn't be imported, make sure you have gst-python installed")
initialized = GES.init()
if not initialized:
raise RuntimeError("GES couldn't be initialized, make sure you have gst-python installed")
pygesdir = $(pkgpyexecdir)
pyges_PYTHON = GES.py
EXTRA_DIST = GES.py
#!/usr/bin/env python
#
# __init__.py
#
# Copyright (C) 2012 Thibault Saunier <thibaul.saunier@collabora.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
print __path__, __name__
......@@ -107,8 +107,30 @@ GOBJECT_INTROSPECTION_CHECK([0.9.6])
dnl check for documentation tools
AG_GST_DOCBOOK_CHECK
GTK_DOC_CHECK([1.3])
AS_PATH_PYTHON([2.1])
AG_GST_PLUGIN_DOCS([1.3],[2.1])
dnl check for python
AM_PATH_PYTHON
AC_MSG_CHECKING(for python >= 2.3)
prog="
import sys, string
minver = (2,3,0,'final',0)
if sys.version_info < minver:
sys.exit(1)
sys.exit(0)"
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
HAVE_PYTHON=yes
AC_MSG_RESULT(okay)
else
HAVE_PYTHON=no
AC_MSG_RESULT(no python)
fi
AM_CONDITIONAL(WITH_PYTHON, [test "x$HAVE_PYTHON" = "xyes"])
dnl *** checks for libraries ***
dnl check for libm, for sin() etc.
......@@ -321,5 +343,10 @@ docs/libs/Makefile
pkgconfig/Makefile
pkgconfig/gst-editing-services.pc
pkgconfig/gst-editing-services-uninstalled.pc
bindings/Makefile
bindings/python/Makefile
bindings/python/gi/Makefile
bindings/python/gi/overrides/Makefile
bindings/python/examples/Makefile
)
AC_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment