[libpeas] Prevent python from generating binary files



commit 519d9ebe0608c855ea84a1050036c93eda7dacbe
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Jan 5 00:55:13 2013 +0100

    Prevent python from generating binary files
    
    Do not generate .pyc and __pycache__ files in the tests: they are not
    needed and break distcheck

 tests/Makefile.plugin             |    4 ----
 tests/testing-util/testing-util.c |    3 +++
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/tests/Makefile.plugin b/tests/Makefile.plugin
index b447637..34ef986 100644
--- a/tests/Makefile.plugin
+++ b/tests/Makefile.plugin
@@ -19,9 +19,5 @@ clean-local:
 	 for plugin in $(noinst_PLUGIN) ; do \
 	   if test -e $(builddir)/$$plugin ; then \
 	     rm -f $(builddir)/$$plugin ; \
-	     # hack to cleanup .pyc files \
-	     if test -e $(builddir)/$${plugin}c ; then \
-	       rm -f $(builddir)/$${plugin}c ; \
-	     fi ; \
 	   fi ; \
 	 done
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 28840ce..8813dff 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -135,6 +135,9 @@ testing_util_init (void)
 
   g_setenv ("PEAS_PLUGIN_LOADERS_DIR", BUILDDIR "/loaders", TRUE);
 
+  /* Prevent python from generating compiled files, they break distcheck */
+  g_setenv ("PYTHONDONTWRITEBYTECODE", "yes", TRUE);
+
   g_irepository_require (g_irepository_get_default (), "Peas", "1.0", 0, &error);
   g_assert_no_error (error);
 



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