summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 21:42:39 -0300
committerPerberos <[email protected]>2011-12-01 21:42:39 -0300
commitfe8aea1c3b5348347633da18a02b0bffd3b266a1 (patch)
tree9881bf77df7572844707cc7c50bd8ca6b5a97076 /python
downloadlibmateweather-fe8aea1c3b5348347633da18a02b0bffd3b266a1.tar.bz2
libmateweather-fe8aea1c3b5348347633da18a02b0bffd3b266a1.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'python')
-rw-r--r--python/Makefile.am37
-rw-r--r--python/Makefile.in652
-rw-r--r--python/bad__init__.py11
-rw-r--r--python/demo.py7
-rw-r--r--python/mateweather.defs326
-rw-r--r--python/mateweather.override104
-rw-r--r--python/mateweathermodule.c45
7 files changed, 1182 insertions, 0 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
new file mode 100644
index 0000000..9593a7a
--- /dev/null
+++ b/python/Makefile.am
@@ -0,0 +1,37 @@
+if BUILD_PYTHON
+INCLUDES = \
+ -I$(top_srcdir) \
+ $(PYTHON_INCLUDES) \
+ $(PYGOBJECT_CFLAGS) \
+ $(GTK_CFLAGS)
+
+pyunstabledir = $(pyexecdir)/mateweather/I_KNOW_THIS_IS_UNSTABLE
+pyunstable_LTLIBRARIES = mateweather.la
+mateweather_la_LDFLAGS = -module -avoid-version -export-symbols-regex initmateweather
+mateweather_la_LIBADD = ../libmateweather/libmateweather.la
+mateweather_la_SOURCES = mateweathermodule.c
+nodist_mateweather_la_SOURCES = mateweather.c
+mateweather.c: mateweather.defs mateweather.override
+
+.defs.c:
+ $(AM_V_GEN)(cd $(srcdir)\
+ && pygobject-codegen-2.0 \
+ --register $(PYGTK_DEFS) \
+ --override $*.override \
+ --prefix py$* $*.defs) > gen-$*.c \
+ && cp gen-$*.c $*.c \
+ && rm -f gen-$*.c
+
+install-exec-hook:
+ $(MKDIR_P) "$(DESTDIR)$(pyunstabledir)"
+ $(INSTALL_DATA) $(srcdir)/bad__init__.py "$(DESTDIR)$(pyexecdir)/mateweather/__init__.py"
+ touch $(DESTDIR)$(pyunstabledir)/__init__.py
+ chmod a+x $(DESTDIR)$(pyunstabledir)/__init__.py
+
+endif
+
+EXTRA_DIST = mateweather.defs mateweather.override bad__init__.py demo.py
+
+CLEANFILES = mateweather.c
+
+-include $(top_srcdir)/git.mk
diff --git a/python/Makefile.in b/python/Makefile.in
new file mode 100644
index 0000000..3e12868
--- /dev/null
+++ b/python/Makefile.in
@@ -0,0 +1,652 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+pkgdatadir = $(datadir)/@[email protected]
+pkgincludedir = $(includedir)/@[email protected]
+pkglibdir = $(libdir)/@[email protected]
+pkglibexecdir = $(libexecdir)/@[email protected]
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @[email protected]
+host_triplet = @[email protected]
+subdir = python
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pyunstabledir)"
+LTLIBRARIES = $(pyunstable_LTLIBRARIES)
[email protected][email protected] ../libmateweather/libmateweather.la
+am__mateweather_la_SOURCES_DIST = mateweathermodule.c
[email protected][email protected]_mateweather_la_OBJECTS = mateweathermodule.lo
[email protected][email protected]_mateweather_la_OBJECTS = mateweather.lo
+mateweather_la_OBJECTS = $(am_mateweather_la_OBJECTS) \
+ $(nodist_mateweather_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+mateweather_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(mateweather_la_LDFLAGS) $(LDFLAGS) -o \
[email protected][email protected]_mateweather_la_rpath = -rpath $(pyunstabledir)
+DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " [email protected];
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o [email protected]
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " [email protected];
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " [email protected];
+SOURCES = $(mateweather_la_SOURCES) $(nodist_mateweather_la_SOURCES)
+DIST_SOURCES = $(am__mateweather_la_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @[email protected]
+ACLOCAL_AMFLAGS = @[email protected]
+ALL_LINGUAS = @[email protected]
+AM_DEFAULT_VERBOSITY = @[email protected]
+AUTOCONF = @[email protected]
+AUTOHEADER = @[email protected]
+AUTOMAKE = @[email protected]
+CATALOGS = @[email protected]
+CATOBJEXT = @[email protected]
+CCDEPMODE = @[email protected]
+COMPRESS_EXT = @[email protected]
+CPPFLAGS = @[email protected]
+CYGPATH_W = @[email protected]
+DATADIR = @[email protected]
+DATADIRNAME = @[email protected]
+DISABLE_DEPRECATED = @[email protected]
+DLLTOOL = @[email protected]
+DSYMUTIL = @[email protected]
+DUMPBIN = @[email protected]
+GETTEXT_PACKAGE = @[email protected]
+GLADEDIR = @[email protected]
+GLIB_CFLAGS = @[email protected]
+GLIB_GENMARSHAL = @[email protected]
+GLIB_LIBS = @[email protected]
+GLIB_MKENUMS = @[email protected]
+GMOFILES = @[email protected]
+GMSGFMT = @[email protected]
+GOBJECT_QUERY = @[email protected]
+GTKDOC_CHECK = @[email protected]
+GTKDOC_MKPDF = @[email protected]
+GTKDOC_REBASE = @[email protected]
+GTK_CFLAGS = @[email protected]
+GTK_LIBS = @[email protected]
+HTML_DIR = @[email protected]
+INSTALL = @[email protected]
+INSTALL_DATA = @[email protected]
+INSTALL_PROGRAM = @[email protected]
+INSTALL_SCRIPT = @[email protected]
+INSTALL_STRIP_PROGRAM = @[email protected]
+INSTOBJEXT = @[email protected]
+INTLLIBS = @[email protected]
+INTLTOOL_EXTRACT = @[email protected]
+INTLTOOL_MERGE = @[email protected]
+INTLTOOL_PERL = @[email protected]
+INTLTOOL_UPDATE = @[email protected]
+LDFLAGS = @[email protected]
+LIBOBJS = @[email protected]
+LIBSOUP_CFLAGS = @[email protected]
+LIBSOUP_LIBS = @[email protected]
+LIBSOUP_MATE_CFLAGS = @[email protected]
+LIBSOUP_MATE_LIBS = @[email protected]
+LIBTOOL = @[email protected]
+LIBXML_CFLAGS = @[email protected]
+LIBXML_LIBS = @[email protected]
+LTLIBOBJS = @[email protected]
+LT_VERSION = @[email protected]
+MAKEINFO = @[email protected]
+MANIFEST_TOOL = @[email protected]
+MATECONFTOOL = @[email protected]
+MATECONF_CFLAGS = @[email protected]
+MATECONF_LIBS = @[email protected]
+MATECONF_SCHEMA_CONFIG_SOURCE = @[email protected]
+MATECONF_SCHEMA_FILE_DIR = @[email protected]
+MKDIR_P = @[email protected]
+MKINSTALLDIRS = @[email protected]
+MSGFMT_OPTS = @[email protected]
+MSGMERGE = @[email protected]
+OBJDUMP = @[email protected]
+OTOOL64 = @[email protected]
+PACKAGE = @[email protected]
+PACKAGE_BUGREPORT = @[email protected]
+PACKAGE_NAME = @[email protected]
+PACKAGE_STRING = @[email protected]
+PACKAGE_TARNAME = @[email protected]
+PACKAGE_URL = @[email protected]
+PACKAGE_VERSION = @[email protected]
+PATH_SEPARATOR = @[email protected]
+PKG_CONFIG = @[email protected]
+PKG_CONFIG_LIBDIR = @[email protected]
+PKG_CONFIG_PATH = @[email protected]
+POFILES = @[email protected]
+PO_IN_DATADIR_FALSE = @[email protected]
+PO_IN_DATADIR_TRUE = @[email protected]
+PYGOBJECT_CFLAGS = @[email protected]
+PYGOBJECT_LIBS = @[email protected]
+PYGTK_DEFS = @[email protected]
+PYTHONDIR = @[email protected]
+PYTHON_EXEC_PREFIX = @[email protected]
+PYTHON_INCLUDES = @[email protected]
+PYTHON_PLATFORM = @[email protected]
+PYTHON_PREFIX = @[email protected]
+PYTHON_VERSION = @[email protected]
+REGEX_LIBS = @[email protected]
+SET_MAKE = @[email protected]
+USE_NLS = @[email protected]
+VERSION = @[email protected]
+WARN_CFLAGS = @[email protected]
+XGETTEXT = @[email protected]
+abs_builddir = @[email protected]
+abs_srcdir = @[email protected]
+abs_top_builddir = @[email protected]
+abs_top_srcdir = @[email protected]
+ac_ct_AR = @[email protected]
+ac_ct_CC = @[email protected]
+ac_ct_DUMPBIN = @[email protected]
+am__include = @[email protected]
+am__leading_dot = @[email protected]
+am__quote = @[email protected]
+am__tar = @[email protected]
+am__untar = @[email protected]
+build_alias = @[email protected]
+build_cpu = @[email protected]
+build_os = @[email protected]
+build_vendor = @[email protected]
+builddir = @[email protected]
+datadir = @[email protected]
+datarootdir = @[email protected]
+exec_prefix = @[email protected]
+host_alias = @[email protected]
+host_cpu = @[email protected]
+host_os = @[email protected]
+host_vendor = @[email protected]
+htmldir = @[email protected]
+includedir = @[email protected]
+infodir = @[email protected]
+install_sh = @[email protected]
+libexecdir = @[email protected]
+localedir = @[email protected]
+localstatedir = @[email protected]
+mkdir_p = @[email protected]
+oldincludedir = @[email protected]
+pkgpyexecdir = @[email protected]
+pkgpythondir = @[email protected]
+program_transform_name = @[email protected]
+pyexecdir = @[email protected]
+pythondir = @[email protected]
+sbindir = @[email protected]
+sharedstatedir = @[email protected]
+sysconfdir = @[email protected]
+target_alias = @[email protected]
+top_build_prefix = @[email protected]
+top_builddir = @[email protected]
+top_srcdir = @[email protected]
+
[email protected][email protected] = $(pyexecdir)/mateweather/I_KNOW_THIS_IS_UNSTABLE
[email protected][email protected]_LTLIBRARIES = mateweather.la
[email protected][email protected]_la_LDFLAGS = -module -avoid-version -export-symbols-regex initmateweather
[email protected][email protected]_la_LIBADD = ../libmateweather/libmateweather.la
[email protected][email protected]_la_SOURCES = mateweathermodule.c
[email protected][email protected]_mateweather_la_SOURCES = mateweather.c
+EXTRA_DIST = mateweather.defs mateweather.override bad__init__.py demo.py
+CLEANFILES = mateweather.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .defs .lo .o .obj
+$(srcdir)/Makefile.in: @[email protected] $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f [email protected]; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu python/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @[email protected] $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @[email protected] $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pyunstableLTLIBRARIES: $(pyunstable_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyunstabledir)" || $(MKDIR_P) "$(DESTDIR)$(pyunstabledir)"
+ @list='$(pyunstable_LTLIBRARIES)'; test -n "$(pyunstabledir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyunstabledir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyunstabledir)"; \
+ }
+
+uninstall-pyunstableLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyunstable_LTLIBRARIES)'; test -n "$(pyunstabledir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyunstabledir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyunstabledir)/$$f"; \
+ done
+
+clean-pyunstableLTLIBRARIES:
+ -test -z "$(pyunstable_LTLIBRARIES)" || rm -f $(pyunstable_LTLIBRARIES)
+ @list='$(pyunstable_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+mateweather.la: $(mateweather_la_OBJECTS) $(mateweather_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(mateweather_la_LINK) $(am_mateweather_la_rpath) $(mateweather_la_OBJECTS) $(mateweather_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+
+.c.o:
[email protected][email protected] $(AM_V_CC)$(COMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] $<
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+
+.c.obj:
[email protected][email protected] $(AM_V_CC)$(COMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] `$(CYGPATH_W) '$<'`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
[email protected][email protected] $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
[email protected][email protected] $(AM_V_CC)$(LTCOMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] $<
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "[email protected]" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pyunstabledir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pyunstableLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pyunstableLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pyunstableLTLIBRARIES
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-pyunstableLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-pyunstableLTLIBRARIES install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-pyunstableLTLIBRARIES
+
[email protected][email protected]: mateweather.defs mateweather.override
+
[email protected][email protected] $(AM_V_GEN)(cd $(srcdir)\
[email protected][email protected] && pygobject-codegen-2.0 \
[email protected][email protected] --register $(PYGTK_DEFS) \
[email protected][email protected] --override $*.override \
[email protected][email protected] --prefix py$* $*.defs) > gen-$*.c \
+
[email protected][email protected] $(MKDIR_P) "$(DESTDIR)$(pyunstabledir)"
[email protected][email protected] $(INSTALL_DATA) $(srcdir)/bad__init__.py "$(DESTDIR)$(pyexecdir)/mateweather/__init__.py"
[email protected][email protected] touch $(DESTDIR)$(pyunstabledir)/__init__.py
[email protected][email protected] chmod a+x $(DESTDIR)$(pyunstabledir)/__init__.py
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/python/bad__init__.py b/python/bad__init__.py
new file mode 100644
index 0000000..11a6970
--- /dev/null
+++ b/python/bad__init__.py
@@ -0,0 +1,11 @@
+# The correct idiom is
+# from mateweather.I_KNOW_THIS_IS_UNSTABLE import mateweather
+
+def location_new_world(use_regions):
+ raise ImportError("libmateweather should only be used if you understand that it's subject to change, and is not supported as a fixed API/ABI or as part of the platform")
+
+def location_entry_new(top):
+ raise ImportError("libmateweather should only be used if you understand that it's subject to change, and is not supported as a fixed API/ABI or as part of the platform")
+
+def timezone_menu_new(top):
+ raise ImportError("libmateweather should only be used if you understand that it's subject to change, and is not supported as a fixed API/ABI or as part of the platform")
diff --git a/python/demo.py b/python/demo.py
new file mode 100644
index 0000000..4ecb0f1
--- /dev/null
+++ b/python/demo.py
@@ -0,0 +1,7 @@
+from mateweather.I_KNOW_THIS_IS_UNSTABLE import mateweather
+
+for loc in mateweather.location_new_world(False).get_children():
+ print loc.get_name()
+ for zone in loc.get_timezones():
+ if zone.get_name() is not None:
+ print " %s" % zone.get_name()
diff --git a/python/mateweather.defs b/python/mateweather.defs
new file mode 100644
index 0000000..bfbf24a
--- /dev/null
+++ b/python/mateweather.defs
@@ -0,0 +1,326 @@
+;; -*- scheme -*-
+; boxed definitions ...
+
+(define-boxed Location
+ (in-module "MateWeather")
+ (c-name "MateWeatherLocation")
+ (gtype-id "MATEWEATHER_TYPE_LOCATION")
+)
+
+(define-boxed Timezone
+ (in-module "MateWeather")
+ (c-name "MateWeatherTimezone")
+ (gtype-id "MATEWEATHER_TYPE_TIMEZONE")
+)
+
+; interface definitions ...
+
+; object definitions ...
+
+(define-object LocationEntry
+ (in-module "MateWeather")
+ (parent "GtkEntry")
+ (c-name "MateWeatherLocationEntry")
+ (gtype-id "MATEWEATHER_TYPE_LOCATION_ENTRY")
+)
+
+(define-object TimezoneMenu
+ (in-module "MateWeather")
+ (parent "GtkComboBox")
+ (c-name "MateWeatherTimezoneMenu")
+ (gtype-id "MATEWEATHER_TYPE_TIMEZONE_MENU")
+)
+
+; pointer definitions ...
+
+;; Enumerations and Flags ...
+
+(define-enum LocationLevel
+ (in-module "MateWeather")
+ (c-name "MateWeatherLocationLevel")
+ (gtype-id "MATEWEATHER_TYPE_LOCATION_LEVEL")
+ (values
+ '("world" "MATEWEATHER_LOCATION_WORLD")
+ '("region" "MATEWEATHER_LOCATION_REGION")
+ '("country" "MATEWEATHER_LOCATION_COUNTRY")
+ '("adm1" "MATEWEATHER_LOCATION_ADM1")
+ '("adm2" "MATEWEATHER_LOCATION_ADM2")
+ '("city" "MATEWEATHER_LOCATION_CITY")
+ '("weather-station" "MATEWEATHER_LOCATION_WEATHER_STATION")
+ )
+)
+
+
+;; From mateweather-enum-types.h
+
+(define-function g_weather_location_level_get_type
+ (c-name "g_weather_location_level_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From mateweather-location.h
+
+(define-function location_get_type
+ (c-name "mateweather_location_get_type")
+ (return-type "GType")
+)
+
+(define-function location_new_world
+ (c-name "mateweather_location_new_world")
+ (return-type "MateWeatherLocation*")
+ (parameters
+ '("gboolean" "use_regions")
+ )
+)
+
+(define-method ref
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_ref")
+ (return-type "MateWeatherLocation*")
+)
+
+(define-method unref
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_unref")
+ (return-type "none")
+)
+
+(define-method get_name
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_sort_name
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_sort_name")
+ (return-type "const-char*")
+)
+
+(define-method get_level
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_level")
+ (return-type "MateWeatherLocationLevel")
+)
+
+(define-method get_parent
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_parent")
+ (return-type "MateWeatherLocation*")
+)
+
+(define-method get_children
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_children")
+ (return-type "MateWeatherLocation**")
+)
+
+(define-method free_children
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_free_children")
+ (return-type "none")
+ (parameters
+ '("MateWeatherLocation**" "children")
+ )
+)
+
+(define-method has_coords
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_has_coords")
+ (return-type "gboolean")
+)
+
+(define-method get_coords
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_coords")
+ (return-type "none")
+ (parameters
+ '("double*" "latitude")
+ '("double*" "longitude")
+ )
+)
+
+(define-method get_distance
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_distance")
+ (return-type "double")
+ (parameters
+ '("MateWeatherLocation*" "loc2")
+ )
+)
+
+(define-method get_country
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_country")
+ (return-type "const-char*")
+)
+
+(define-method get_timezone
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_timezone")
+ (return-type "MateWeatherTimezone*")
+)
+
+(define-method get_timezones
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_timezones")
+ (return-type "MateWeatherTimezone**")
+)
+
+(define-method free_timezones
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_free_timezones")
+ (return-type "none")
+ (parameters
+ '("MateWeatherTimezone**" "zones")
+ )
+)
+
+(define-method get_code
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_code")
+ (return-type "const-char*")
+)
+
+(define-method get_city_name
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_city_name")
+ (return-type "char*")
+)
+
+(define-method get_weather
+ (of-object "MateWeatherLocation")
+ (c-name "mateweather_location_get_weather")
+ (return-type "WeatherInfo*")
+)
+
+
+
+;; From mateweather-timezone.h
+
+(define-function timezone_get_type
+ (c-name "mateweather_timezone_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_tzid
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_get_tzid")
+ (return-type "const-char*")
+)
+
+(define-method get_offset
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_get_offset")
+ (return-type "int")
+)
+
+(define-method has_dst
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_has_dst")
+ (return-type "gboolean")
+)
+
+(define-method get_dst_offset
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_get_dst_offset")
+ (return-type "int")
+)
+
+(define-method ref
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_ref")
+ (return-type "MateWeatherTimezone*")
+)
+
+(define-method unref
+ (of-object "MateWeatherTimezone")
+ (c-name "mateweather_timezone_unref")
+ (return-type "none")
+)
+
+
+
+;; From location-entry.h
+
+(define-function location_entry_get_type
+ (c-name "mateweather_location_entry_get_type")
+ (return-type "GType")
+)
+
+(define-function location_entry_new
+ (c-name "mateweather_location_entry_new")
+ (is-constructor-of "MateWeatherLocationEntry")
+ (return-type "GtkWidget*")
+ (properties
+ '("top")
+ )
+)
+
+(define-method set_location
+ (of-object "MateWeatherLocationEntry")
+ (c-name "mateweather_location_entry_set_location")
+ (return-type "none")
+ (parameters
+ '("MateWeatherLocation*" "loc")
+ )
+)
+
+(define-method get_location
+ (of-object "MateWeatherLocationEntry")
+ (c-name "mateweather_location_entry_get_location")
+ (return-type "MateWeatherLocation*")
+)
+
+(define-method set_city
+ (of-object "MateWeatherLocationEntry")
+ (c-name "mateweather_location_entry_set_city")
+ (return-type "none")
+ (parameters
+ '("const-char*" "city_name")
+ '("const-char*" "code")
+ )
+)
+
+
+
+;; From timezone-menu.h
+
+(define-function timezone_menu_get_type
+ (c-name "mateweather_timezone_menu_get_type")
+ (return-type "GType")
+)
+
+(define-function timezone_menu_new
+ (c-name "mateweather_timezone_menu_new")
+ (is-constructor-of "MateWeatherTimezoneMenu")
+ (return-type "GtkWidget*")
+ (properties
+ '("top")
+ )
+)
+
+(define-method set_tzid
+ (of-object "MateWeatherTimezoneMenu")
+ (c-name "mateweather_timezone_menu_set_tzid")
+ (return-type "none")
+ (parameters
+ '("const-char*" "tzid")
+ )
+)
+
+(define-method get_tzid
+ (of-object "MateWeatherTimezoneMenu")
+ (c-name "mateweather_timezone_menu_get_tzid")
+ (return-type "const-char*")
+)
+
+
diff --git a/python/mateweather.override b/python/mateweather.override
new file mode 100644
index 0000000..16ce1e0
--- /dev/null
+++ b/python/mateweather.override
@@ -0,0 +1,104 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ *
+ * mateweather.override: overrides for mateweather
+ */
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include "pygobject.h"
+
+#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE
+#include <libmateweather/mateweather-location.h>
+#include <libmateweather/mateweather-timezone.h>
+#include <libmateweather/location-entry.h>
+#include <libmateweather/timezone-menu.h>
+#include <libmateweather/mateweather-enum-types.h>
+
+%%
+modulename mateweather
+%%
+import gtk.Entry as PyGtkEntry_Type
+import gtk.ComboBox as PyGtkComboBox_Type
+%%
+ignore
+ mateweather_location_get_weather
+ mateweather_location_free_children
+ mateweather_location_free_timezones
+%%
+ignore-glob
+ *_get_type
+ *_ref
+ *_unref
+%%
+override mateweather_location_get_children
+static PyObject *
+_wrap_mateweather_location_get_children (PyGObject *self, PyObject *args)
+{
+ MateWeatherLocation *loc, **children;
+ int i;
+ PyObject *pychildren, *pychild;
+
+ loc = pyg_boxed_get (self, MateWeatherLocation);
+ children = mateweather_location_get_children (loc);
+ for (i = 0; children[i]; i++)
+ ;
+
+ pychildren = PyList_New (i);
+ for (i = 0; children[i]; i++) {
+ pychild = pyg_boxed_new (MATEWEATHER_TYPE_LOCATION, children[i], TRUE, TRUE);
+ PyList_SetItem (pychildren, i, pychild);
+ }
+
+ mateweather_location_free_children (loc, children);
+ return pychildren;
+}
+%%
+override mateweather_location_get_timezones
+static PyObject *
+_wrap_mateweather_location_get_timezones (PyGObject *self, PyObject *args)
+{
+ MateWeatherLocation *loc;
+ MateWeatherTimezone **zones;
+ int i;
+ PyObject *pyzones, *pyzone;
+
+ loc = pyg_boxed_get (self, MateWeatherLocation);
+ zones = mateweather_location_get_timezones (loc);
+ for (i = 0; zones[i]; i++)
+ ;
+
+ pyzones = PyList_New (i);
+ for (i = 0; zones[i]; i++) {
+ pyzone = pyg_boxed_new (MATEWEATHER_TYPE_TIMEZONE, zones[i], TRUE, TRUE);
+ PyList_SetItem (pyzones, i, pyzone);
+ }
+
+ mateweather_location_free_timezones (loc, zones);
+ return pyzones;
+}
+%%
+override mateweather_location_get_coords
+static PyObject *
+_wrap_mateweather_location_get_coords (PyGObject *self, PyObject *args)
+{
+ MateWeatherLocation *loc;
+ double latitude, longitude;
+ PyObject *ret;
+
+ loc = pyg_boxed_get (self, MateWeatherLocation);
+ if (!mateweather_location_has_coords (loc)) {
+ Py_INCREF (Py_None);
+ return Py_None;
+ }
+
+ mateweather_location_get_coords (loc, &latitude, &longitude);
+ ret = PyTuple_New (2);
+ PyTuple_SetItem (ret, 0, PyFloat_FromDouble (latitude));
+ PyTuple_SetItem (ret, 1, PyFloat_FromDouble (longitude));
+ return ret;
+}
+%%
+new-constructor MATEWEATHER_TYPE_LOCATION_ENTRY
+%%
+new-constructor MATEWEATHER_TYPE_TIMEZONE_MENU
+%%
diff --git a/python/mateweathermodule.c b/python/mateweathermodule.c
new file mode 100644
index 0000000..9427849
--- /dev/null
+++ b/python/mateweathermodule.c
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ *
+ * mateweathermodule.c: module wrapping mateweather.
+ *
+ * This library 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 library 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 library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* include this first, before NO_IMPORT_PYGOBJECT is defined */
+#include <pygobject.h>
+
+void pymateweather_register_classes (PyObject *d);
+void pymateweather_add_constants(PyObject *module, const gchar *strip_prefix);
+void _pymateweather_register_boxed_types(void);
+
+extern PyMethodDef pymateweather_functions[];
+
+DL_EXPORT(void)
+initmateweather(void)
+{
+ PyObject *m, *d;
+
+ init_pygobject ();
+ g_thread_init (NULL);
+
+ m = Py_InitModule ("mateweather", pymateweather_functions);
+ d = PyModule_GetDict (m);
+ pymateweather_register_classes (d);
+ pymateweather_add_constants(m, "MATEWEATHER_");
+}