[glom] Fix distcheck.



commit c155ba0bd6ab3096919b8c1de06cfe9cbb924390
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 10 16:10:04 2009 +0100

    Fix distcheck.
    
    * Makefile.am:
    * Makefile_tests.am: Fix the distcheck by disting the DTD validation
    test script and the .glom file that it uses.
    * glom/libglom/init.cc: Redefine Python's PyDateTime_IMPORT macro,
    to avoid a compiler warning. See http://bugs.python.org/issue7463
    * glom/main.cc: Avoid including Python's datetime.h, to avoid the same
    compiler warning.

 ChangeLog            |   12 ++++++++++++
 Makefile.am          |    8 ++++++--
 Makefile_tests.am    |    4 ++++
 glom/libglom/init.cc |    8 ++++++++
 glom/main.cc         |    3 ---
 5 files changed, 30 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c599281..a44c6ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-10  Murray Cumming  <murrayc murrayc com>
+
+	Fix distcheck.
+
+	* Makefile.am:
+	* Makefile_tests.am: Fix the distcheck by disting the DTD validation 
+	test script and the .glom file that it uses.
+	* glom/libglom/init.cc: Redefine Python's PyDateTime_IMPORT macro, 
+	to avoid a compiler warning. See http://bugs.python.org/issue7463
+	* glom/main.cc: Avoid including Python's datetime.h, to avoid the same 
+	compiler warning.
+
 2009-12-09  Murray Cumming  <murrayc murrayc-desktop>
 
 	Tests: Complete the test_python_execute_func_date test.
diff --git a/Makefile.am b/Makefile.am
index 8fe4d83..21deb26 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -98,6 +98,8 @@ dist_example_DATA =				\
 	examples/example_project_manager.glom	\
 	examples/example_smallbusiness.glom
 
+dist_noinst_DATA = examples/sqlite/test_sqlite_music/test_sqlite_music.glom
+
 iconthemedir = $(datadir)/icons/hicolor
 appicon16dir = $(iconthemedir)/16x16/apps
 appicon22dir = $(iconthemedir)/22x22/apps
@@ -155,9 +157,11 @@ dist_intltool = intltool-extract.in intltool-merge.in intltool-update.in
 dist_docfiles = docs/overview.txt docs/developer_documentation.txt \
 		docs/postgres_test.c docs/postgres_gda_test.c win32/README
 
-dist_noinst_DATA = $(dist_template) $(noinst_icons) $(dist_docutils) \
+dist_noinst_DATA += $(dist_template) $(noinst_icons) $(dist_docutils) \
 		   $(dist_intltool) $(dist_docfiles)
-dist_noinst_SCRIPTS = autogen.sh win32/build-installer
+
+# We use += here because we already used = in Makefile_tests.am:
+dist_noinst_SCRIPTS += autogen.sh win32/build-installer
 
 CLEANFILES = $(dbusservice_DATA) $(desktop_DATA) $(win_resfile)
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
diff --git a/Makefile_tests.am b/Makefile_tests.am
index 51b56d4..0843136 100644
--- a/Makefile_tests.am
+++ b/Makefile_tests.am
@@ -41,6 +41,10 @@ TESTS =	tests/test_parsing_time	\
 	tests/import/test_parsing \
 	tests/import/test_signals
 
+# We also set this in Makefile.am, with +=, 
+# but this is the first use, where we must use =
+dist_noinst_SCRIPTS = tests/dtd/test_example_sqlite
+
 #TESTS_ENVIRONMENT=which valgrind && valgrind --tool=memcheck --leak-check=full --leak-resolution=high --trace-children=yes --num-callers=30
 
 tests_ldadd = glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(LIBGLOM_LIBS)
diff --git a/glom/libglom/init.cc b/glom/libglom/init.cc
index 3b90762..97a813e 100644
--- a/glom/libglom/init.cc
+++ b/glom/libglom/init.cc
@@ -27,6 +27,14 @@
 #include <giomm.h>
 #include <libgdamm.h>
 
+
+//TODO: Remove this redefine when Python fixes the compiler error in their macro:
+// http://bugs.python.org/issue7463
+#undef PyDateTime_IMPORT
+#define PyDateTime_IMPORT \
+        PyDateTimeAPI = (PyDateTime_CAPI*) PyCObject_Import((char*)"datetime", \
+                                                            (char*)"datetime_CAPI")
+
 namespace Glom
 {
 
diff --git a/glom/main.cc b/glom/main.cc
index 5b1c88e..d8cfd7d 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -22,9 +22,6 @@
 
 //We use Python for calculated fields.
 #include <Python.h> //Include it before anything else to avoid "_POSIX_C_SOURCE redefined".
-#if PY_VERSION_HEX >= 0x02040000
-# include <datetime.h> /* From Python */
-#endif
 
 //#include <gnome.h>
 #include <glom/libglom/init.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]