gimp r25818 - in branches/soc-2008-python: . plug-ins/pygimp
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25818 - in branches/soc-2008-python: . plug-ins/pygimp
- Date: Mon, 26 May 2008 20:20:17 +0000 (UTC)
Author: larsc
Date: Mon May 26 20:20:17 2008
New Revision: 25818
URL: http://svn.gnome.org/viewvc/gimp?rev=25818&view=rev
Log:
2008-05-28 Lars-Peter Clausen <lars metafoo de>
Changed the 'gimp' module to folder with a __init__.py so that it is
able to contain submodules. Renamed the C based 'gimp' module to '_gimp'.
__init__.py imports all symbols from _gimp.
* plug-ins/pygimp/Makefile.am
* plug-ins/pygimp/makefile.msc
* plug-ins/pygimp/gimpmodule.c
* plug-ins/pygimp/__init__.py
Added:
branches/soc-2008-python/plug-ins/pygimp/__init__.py
Modified:
branches/soc-2008-python/ChangeLog
branches/soc-2008-python/plug-ins/pygimp/Makefile.am
branches/soc-2008-python/plug-ins/pygimp/gimpmodule.c
branches/soc-2008-python/plug-ins/pygimp/makefile.msc
Modified: branches/soc-2008-python/plug-ins/pygimp/Makefile.am
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/Makefile.am (original)
+++ branches/soc-2008-python/plug-ins/pygimp/Makefile.am Mon May 26 20:20:17 2008
@@ -25,11 +25,14 @@
pygimpbase = python
pygimpdir = $(gimpplugindir)/$(pygimpbase)
+pygimpmoduledir = $(pygimpdir)/gimp
-pygimp_LTLIBRARIES = gimp.la _gimpenums.la gimpcolor.la _gimpui.la \
+pygimp_LTLIBRARIES = _gimpenums.la gimpcolor.la _gimpui.la \
gimpthumb.la
-gimp_la_SOURCES = \
+pygimpmodule_LTLIBRARIES = _gimp.la
+
+_gimp_la_SOURCES = \
gimpmodule.c \
pygimp-display.c \
pygimp-drawable.c \
@@ -43,10 +46,10 @@
pygimp-intl.h \
pygimp-util.h
-gimp_la_LDFLAGS = -module -avoid-version $(no_undefined) \
- -export-symbols-regex initgimp
+_gimp_la_LDFLAGS = -module -avoid-version $(no_undefined) \
+ -export-symbols-regex init_gimp
-gimp_la_LIBADD = \
+_gimp_la_LIBADD = \
$(libgimp) \
$(libgimpcolor) \
$(libgimpbase) \
@@ -123,6 +126,9 @@
pygimp_DATA = pygimp-logo.png
+pygimpmodule_PYTHON = \
+ __init__.py
+
codegen_files = \
gimpcolor-types.defs \
gimpenums-types.defs \
Added: branches/soc-2008-python/plug-ins/pygimp/__init__.py
==============================================================================
--- (empty file)
+++ branches/soc-2008-python/plug-ins/pygimp/__init__.py Mon May 26 20:20:17 2008
@@ -0,0 +1,26 @@
+# -*- Mode: Python; py-indent-offset: 3 -*-
+# Gimp-Python - allows the writing of Gimp plugins in Python.
+# Copyright (C) 2008 Lars-Peter Clausen <lars metafoo de>
+#
+# 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 2 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 General Public License for more details.
+#
+# You should have received a copy of the GNU 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.
+
+"""
+Initialisation file for pygimp module.
+"""
+
+from _gimp import *
+from _gimp import _id2image, _id2drawable, _id2vectors, _id2display, _PyGimp_API
+
+import context
Modified: branches/soc-2008-python/plug-ins/pygimp/gimpmodule.c
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/gimpmodule.c (original)
+++ branches/soc-2008-python/plug-ins/pygimp/gimpmodule.c Mon May 26 20:20:17 2008
@@ -1,4 +1,4 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
+/* -*- Mode: C; c-basic-offset: 3 -*-
Gimp-Python - allows the writing of Gimp plugins in Python.
Copyright (C) 1997-2002 James Henstridge <james daa com au>
@@ -1778,16 +1778,16 @@
};
-/* Initialization function for the module (*must* be called initgimp) */
+/* Initialization function for the module (*must* be called init_gimp) */
static char gimp_module_documentation[] =
"This module provides interfaces to allow you to write gimp plugins"
;
-void initgimp(void);
+void init_gimp(void);
PyMODINIT_FUNC
-initgimp(void)
+init_gimp(void)
{
PyObject *m;
@@ -1883,7 +1883,7 @@
PyUnicode_SetDefaultEncoding("utf-8");
/* Create the module and add the functions */
- m = Py_InitModule4("gimp", gimp_methods,
+ m = Py_InitModule4("_gimp", gimp_methods,
gimp_module_documentation,
NULL, PYTHON_API_VERSION);
Modified: branches/soc-2008-python/plug-ins/pygimp/makefile.msc
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/makefile.msc (original)
+++ branches/soc-2008-python/plug-ins/pygimp/makefile.msc Mon May 26 20:20:17 2008
@@ -1,6 +1,6 @@
!IFNDEF MODULE
-MODULES = gimp _gimpenums gimpcolor _gimpui
+MODULES = _gimp _gimpenums gimpcolor _gimpui
all : sub-all
@@ -16,7 +16,7 @@
#OPTIMIZE = -Od -Op
#DEBUG=1
-!IFDEF OBJ_gimp
+!IFDEF OBJ__gimp
OBJECTS = \
gimpmodule.obj \
pygimp-image.obj \
@@ -84,4 +84,4 @@
del gimpui.c
-
\ No newline at end of file
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]