Merge lp:~dobey/libubuntuone/init-restructure into lp:libubuntuone

Proposed by dobey on 2012-01-12
Status: Merged
Approved by: dobey on 2012-01-13
Approved revision: 145
Merged at revision: 145
Proposed branch: lp:~dobey/libubuntuone/init-restructure
Merge into: lp:libubuntuone
Diff against target: 326 lines (+3/-250)
10 files modified
Makefile.am (+2/-2)
bindings/Makefile.am (+1/-1)
bindings/python/Makefile.am (+0/-46)
bindings/python/__init__.py (+0/-15)
bindings/python/test-music-store.py (+0/-25)
bindings/python/ubuntuone.defs (+0/-41)
bindings/python/ubuntuone.override (+0/-13)
bindings/python/ubuntuone/__init__.py (+0/-15)
bindings/python/ubuntuonemodule.c (+0/-21)
configure.ac (+0/-71)
To merge this branch: bzr merge lp:~dobey/libubuntuone/init-restructure
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve on 2012-01-13
Manuel de la Peña (community) 2012-01-12 Approve on 2012-01-13
Review via email: mp+88416@code.launchpad.net

Commit Message

Remove the manual python bindings, as we'll be switching to only GI for this
Disable the mono bindings for now (not usable on gtk3)

Description of the Change

This removes the current python bindings code (as it is complicated to build, and we will be using only gobject-introspection bindings in the future). This also disables building the mono bindings for now, as gtk3 on mono is up in the air, and may or may not exist in Ubuntu 12.04. However, it is improbable that GI will be supported in mono/gtk-sharp in either case, we'll leave the code around for now, in trunk.

To post a comment you must log in.
review: Approve
Roberto Alsina (ralsina) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2010-08-25 18:35:07 +0000
3+++ Makefile.am 2012-01-12 18:15:41 +0000
4@@ -1,8 +1,8 @@
5-SUBDIRS = data libubuntuone tests bindings po
6+SUBDIRS = data libubuntuone tests po
7
8 EXTRA_DIST = COPYING.GPL
9
10-pcfiles = libubuntuone-1.0.pc ubuntuone-sharp-1.0.pc
11+pcfiles = libubuntuone-1.0.pc
12
13 libubuntuone-1.0.pc: libubuntuone.pc
14 @cp -f $< $@
15
16=== modified file 'bindings/Makefile.am'
17--- bindings/Makefile.am 2010-08-25 18:35:07 +0000
18+++ bindings/Makefile.am 2012-01-12 18:15:41 +0000
19@@ -1,3 +1,3 @@
20-SUBDIRS = python mono
21+SUBDIRS = mono
22
23 MAINTAINERCLEANFILES = Makefile.in
24
25=== removed directory 'bindings/python'
26=== removed file 'bindings/python/Makefile.am'
27--- bindings/python/Makefile.am 2011-02-16 15:30:29 +0000
28+++ bindings/python/Makefile.am 1970-01-01 00:00:00 +0000
29@@ -1,46 +0,0 @@
30-INCLUDES = \
31- -I$(top_srcdir)/libubuntuone \
32- $(LIBUBUNTUONE_CFLAGS) \
33- $(PYGTK_CFLAGS) \
34- $(PYTHON_CFLAGS)
35-
36-defsdir = $(datadir)/ubuntuone/1.0/defs
37-defs_DATA = ubuntuone.defs
38-
39-ubuntuonedir = $(pkgpyexecdir)/ubuntuone
40-ubuntuone_LTLIBRARIES = _gtkwidgets.la
41-ubuntuone_DATA = ubuntuone/__init__.py
42-
43-gtkwidgetsdir = $(pkgpythondir)/ubuntuone/gtkwidgets
44-gtkwidgets_DATA = __init__.py
45-
46-python_DATA = $(PACKAGE).pth
47-
48-$(PACKAGE).pth: Makefile
49- echo $(PACKAGE) > $@
50-
51-ubuntuone.c: ubuntuone.defs ubuntuone.override
52- $(PYGNOME_CODEGEN) \
53- --register $(PYGTK_DEFSDIR)/pango-types.defs \
54- --register $(PYGTK_DEFSDIR)/gdk-types.defs \
55- --register $(PYGTK_DEFSDIR)/gtk-types.defs \
56- --prefix gtkwidgets \
57- --override $(srcdir)/ubuntuone.override \
58- $(srcdir)/ubuntuone.defs > $@
59-
60-
61-_gtkwidgets_la_SOURCES = \
62- ubuntuone.c \
63- ubuntuonemodule.c
64-_gtkwidgets_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gtkwidgets
65-_gtkwidgets_la_LIBADD = \
66- $(LIBUBUNTUONE_LIBS) \
67- $(PYGTK_LIBS) \
68- $(PYTHON_LDFLAGS) \
69- $(top_builddir)/libubuntuone/libubuntuone-1.0.la
70-
71-CLEANFILES = ubuntuone.c $(python_DATA)
72-
73-EXTRA_DIST = ubuntuone.defs ubuntuone.override __init__.py ubuntuone/__init__.py
74-
75-MAINTAINERCLEANFILES = Makefile.in
76
77=== removed file 'bindings/python/__init__.py'
78--- bindings/python/__init__.py 2010-08-25 18:35:07 +0000
79+++ bindings/python/__init__.py 1970-01-01 00:00:00 +0000
80@@ -1,15 +0,0 @@
81-# Copyright 2010 Canonical Ltd.
82-#
83-# This program is free software: you can redistribute it and/or modify it
84-# under the terms of the GNU General Public License version 3, as published
85-# by the Free Software Foundation.
86-#
87-# This program is distributed in the hope that it will be useful, but
88-# WITHOUT ANY WARRANTY; without even the implied warranties of
89-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
90-# PURPOSE. See the GNU General Public License for more details.
91-#
92-# You should have received a copy of the GNU General Public License along
93-# with this program. If not, see <http://www.gnu.org/licenses/>.
94-"""ubuntuone.gtkwidgets package"""
95-from ubuntuone._gtkwidgets import *
96
97=== removed file 'bindings/python/test-music-store.py'
98--- bindings/python/test-music-store.py 2010-05-27 11:51:36 +0000
99+++ bindings/python/test-music-store.py 1970-01-01 00:00:00 +0000
100@@ -1,25 +0,0 @@
101-#!/usr/bin/python
102-
103-import gtk
104-from ubuntuone.gtkwidgets import MusicStore
105-
106-def preview_mp3_cb(music_store, url, title):
107- print "Requested preview of file %s with title %s" % (url, title)
108- music_store.load_store_link('http://stores.7digital.com/corporate_1/artists/govt-mule/the-deepest-end-live-in-concert-1/')
109-
110-def url_loaded_cb(music_store, url):
111- print "URL loaded %s" % url
112-
113-window = gtk.Window()
114-window.set_size_request(839, 600)
115-window.connect("destroy", gtk.main_quit)
116-
117-store = MusicStore()
118-print 'Library location is %s' % store.get_library_location()
119-store.show()
120-store.connect("preview-mp3", preview_mp3_cb)
121-store.connect("url-loaded", url_loaded_cb)
122-window.add(store)
123-window.show()
124-
125-gtk.main()
126
127=== removed directory 'bindings/python/ubuntuone'
128=== removed file 'bindings/python/ubuntuone.defs'
129--- bindings/python/ubuntuone.defs 2010-05-27 11:51:36 +0000
130+++ bindings/python/ubuntuone.defs 1970-01-01 00:00:00 +0000
131@@ -1,41 +0,0 @@
132-;; -*- scheme -*-
133-
134-; object definitions ...
135-(define-object MusicStore
136- (in-module "U1")
137- (parent "GtkVBox")
138- (c-name "U1MusicStore")
139- (gtype-id "U1_TYPE_MUSIC_STORE")
140-)
141-
142-;; Enumerations and flags ...
143-
144-
145-;; From u1-music-store.h
146-
147-(define-function music_store_get_type
148- (c-name "u1_music_store_get_type")
149- (return-type "GType")
150-)
151-
152-(define-function u1_music_store_new
153- (c-name "u1_music_store_new")
154- (is-constructor-of "U1MusicStore")
155- (return-type "GtkWidget*")
156-)
157-
158-(define-method get_library_location
159- (of-object "U1MusicStore")
160- (c-name "u1_music_store_get_library_location")
161- (return-type "const-gchar*")
162-)
163-
164-(define-method load_store_link
165- (of-object "U1MusicStore")
166- (c-name "u1_music_store_load_store_link")
167- (return-type "none")
168- (parameters
169- '("const-gchar*" "url")
170- )
171-)
172-
173
174=== removed file 'bindings/python/ubuntuone.override'
175--- bindings/python/ubuntuone.override 2010-02-09 22:54:22 +0000
176+++ bindings/python/ubuntuone.override 1970-01-01 00:00:00 +0000
177@@ -1,13 +0,0 @@
178-%%
179-headers
180-#include <Python.h>
181-#include "pygobject.h"
182-#include "u1-music-store.h"
183-%%
184-modulename ubuntuone.gtkwidgets
185-%%
186-import gtk.VBox as PyGtkVBox_Type
187-%%
188-ignore-glob
189- *_get_type
190-%%
191
192=== removed file 'bindings/python/ubuntuone/__init__.py'
193--- bindings/python/ubuntuone/__init__.py 2011-02-16 15:30:29 +0000
194+++ bindings/python/ubuntuone/__init__.py 1970-01-01 00:00:00 +0000
195@@ -1,15 +0,0 @@
196-# Copyright 2009-2011 Canonical Ltd.
197-#
198-# This program is free software: you can redistribute it and/or modify it
199-# under the terms of the GNU General Public License version 3, as published
200-# by the Free Software Foundation.
201-#
202-# This program is distributed in the hope that it will be useful, but
203-# WITHOUT ANY WARRANTY; without even the implied warranties of
204-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
205-# PURPOSE. See the GNU General Public License for more details.
206-#
207-# You should have received a copy of the GNU General Public License along
208-# with this program. If not, see <http://www.gnu.org/licenses/>.
209-"""ubuntuone package"""
210-__import__('pkg_resources').declare_namespace(__name__)
211
212=== removed file 'bindings/python/ubuntuonemodule.c'
213--- bindings/python/ubuntuonemodule.c 2010-10-18 18:25:45 +0000
214+++ bindings/python/ubuntuonemodule.c 1970-01-01 00:00:00 +0000
215@@ -1,21 +0,0 @@
216-#include <pygobject.h>
217-
218-void gtkwidgets_register_classes (PyObject *d);
219-extern PyMethodDef gtkwidgets_functions[];
220-
221-DL_EXPORT(void)
222-init_gtkwidgets(void)
223-{
224- PyObject *m, *d;
225-
226- init_pygobject ();
227-
228- m = Py_InitModule ("ubuntuone._gtkwidgets", gtkwidgets_functions);
229- d = PyModule_GetDict (m);
230-
231- gtkwidgets_register_classes (d);
232-
233- if (PyErr_Occurred ()) {
234- Py_FatalError ("can't initialise module ubuntuone._gtkwidgets");
235- }
236-}
237
238=== modified file 'configure.ac'
239--- configure.ac 2011-12-20 23:11:04 +0000
240+++ configure.ac 2012-01-12 18:15:41 +0000
241@@ -89,72 +89,6 @@
242 DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc --enable-debug"
243 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
244
245-dnl Checks for Mono bindings
246-AC_PATH_PROG(MONO_GAPI_PARSER, gapi2-parser, no)
247-if test "x$MONO_GAPI_PARSER" = "xno"; then
248- AC_MSG_ERROR(could not find gapi2-parser)
249-fi
250-
251-AC_PATH_PROG(MONO_GAPI_CODEGEN, gapi2-codegen, no)
252-if test "x$MONO_GAPI_CODEGEN" = "xno"; then
253- AC_MSG_ERROR(could not find gapi2-codegen)
254-fi
255-
256-AC_PATH_PROG(MONO_GAPI_FIXUP, gapi2-fixup, no)
257-if test "x$MONO_GAPI_FIXUP" = "xno"; then
258- AC_MSG_ERROR(could not find gapi2-fixup)
259-fi
260-
261-AC_PATH_PROG(MONO_CSC, gmcs, no)
262-if test "x$MONO_CSC" = "xno"; then
263- AC_MSG_ERROR(could not find gmcs compiler)
264-fi
265-
266-AC_PATH_PROG([MONO_SN], [sn], [no])
267-if test "x$MONO_SN" = "xno"; then
268- AC_MSG_ERROR([could not find sn])
269-fi
270-
271-dnl Checks for Python bindings
272-AM_PATH_PYTHON(2.5)
273-AC_PATH_PROG(PYTHON_CONFIG, python-config, no)
274-if test "x$PYTHON_CONFIG" = "xno"; then
275- AC_MSG_ERROR(could not find python-config script)
276-else
277- PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags`
278- PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
279- AC_SUBST(PYTHON_CFLAGS)
280- AC_SUBST(PYTHON_LDFLAGS)
281-fi
282-
283-PKG_CHECK_MODULES(PYGTK, pygtk-2.0)
284-PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0)
285-AC_SUBST(PYGTK_CFLAGS)
286-AC_SUBST(PYGTK_LIBS)
287-AC_SUBST(GTKSHARP_CFLAGS)
288-AC_SUBST(GTKSHARP_LIBS)
289-
290-dnl Check for .defs pygtk dir
291-AC_MSG_CHECKING(for pygtk defs)
292-PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
293-AC_SUBST(PYGTK_DEFSDIR)
294-AC_MSG_RESULT($PYGTK_DEFSDIR)
295-
296-dnl check for codegen script
297-AC_PATH_PROG(PYGOBJECT_CODEGEN, pygobject-codegen-2.0, no)
298-if test "x$PYGOBJECT_CODEGEN" = xno; then
299- dnl This is for compat with older releases when codegen was shipped
300- dnl in pygtk. It should be removed in future releases.
301- AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
302- if test "x$PYGTK_CODEGEN" = xno; then
303- AC_MSG_ERROR(could not find pygobject-codegen-2.0 script)
304- else
305- AC_SUBST(PYGNOME_CODEGEN, $PYGTK_CODEGEN)
306- fi
307-else
308- AC_SUBST(PYGNOME_CODEGEN, $PYGOBJECT_CODEGEN)
309-fi
310-
311 dnl JavaScript scripts location
312 U1_JAVASCRIPT_DIR=$datadir/libubuntuone/$LIBUBUNTUONE_CURRENT/javascript
313 AC_SUBST(U1_JAVASCRIPT_DIR)
314@@ -177,13 +111,8 @@
315 Makefile
316 data/Makefile
317 libubuntuone.pc
318-ubuntuone-sharp.pc
319 libubuntuone/Makefile
320 tests/Makefile
321-bindings/Makefile
322-bindings/python/Makefile
323-bindings/mono/Makefile
324-bindings/mono/ubuntuone-sharp.dll.config
325 po/Makefile.in
326 ])
327

Subscribers

People subscribed via source and target branches