[Python-modules-commits] r8927 - in packages/python-toscawidgets/trunk/debian (changelog rules)

zack at users.alioth.debian.org zack at users.alioth.debian.org
Fri Jul 3 16:42:26 UTC 2009


    Date: Friday, July 3, 2009 @ 16:42:23
  Author: zack
Revision: 8927

workaround to avoid pysupport removing __init__.py from tw.forms.templates

Modified:
  packages/python-toscawidgets/trunk/debian/changelog
  packages/python-toscawidgets/trunk/debian/rules

Modified: packages/python-toscawidgets/trunk/debian/changelog
===================================================================
--- packages/python-toscawidgets/trunk/debian/changelog	2009-07-03 16:16:00 UTC (rev 8926)
+++ packages/python-toscawidgets/trunk/debian/changelog	2009-07-03 16:42:23 UTC (rev 8927)
@@ -1,6 +1,10 @@
 python-toscawidgets (0.9.7.1-2) UNRELEASED; urgency=low
 
-  * debian/rules: remove *.pyc before building
+  * debian/rules:
+    - remove *.pyc before building
+    - add ugly hack to avoid pysupport removing __init__.py from the
+      templates/ dir: even if that dir contains no .py, it is used as a
+      module at runtime
 
  -- Stefano Zacchiroli <zack at debian.org>  Fri, 03 Jul 2009 13:32:00 +0200
 

Modified: packages/python-toscawidgets/trunk/debian/rules
===================================================================
--- packages/python-toscawidgets/trunk/debian/rules	2009-07-03 16:16:00 UTC (rev 8926)
+++ packages/python-toscawidgets/trunk/debian/rules	2009-07-03 16:42:23 UTC (rev 8927)
@@ -10,11 +10,27 @@
 	$(NULL)
 export SUBDIRS = $(UPSTREAMS)
 
+# Dirs of Python modules which should exist in spite of not containing
+# any .py file (e.g. templates for genshi). This list is used to
+# hackishly work around pysupport eager removal of "unneeded"
+# __init__.py files
+force_modules = \
+	tw.forms/tw/forms/templates \
+	$(NULL)
+
 DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed
 
 makebuilddir/$(PKG)::
 	find . -name '*.pyc' -exec rm {} \;
 
+makebuilddir/$(PKG)::
+	for d in $(force_modules) ; do \
+		echo '# NOT A REAL PYTHON MODULE, DO NOT USE.' > $$d/i_dont_exist.py ; \
+		echo '# Work around for pysupport eagerness in removing "useless" __init__.py' >> $$d/i_dont_exist.py ; \
+	done
+clean::
+	for d in $(force_modules) ; do rm -f $$d/i_dont_exist.py ; done
+
 # avoid installing useless *.pth files ; fix spurious +x bits
 install/$(PKG)::
 	rm -f debian/$(PKG)/usr/lib/python*/site-packages/*.pth




More information about the Python-modules-commits mailing list