[Python-modules-commits] r17533 - in packages/python-docutils/trunk/debian (2 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sun Jun 19 15:18:27 UTC 2011


    Date: Sunday, June 19, 2011 @ 15:18:26
  Author: jwilk
Revision: 17533

Check if move-data-to-usr-share.diff is up-to-date in the build target.

Modified:
  packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff
  packages/python-docutils/trunk/debian/rules

Modified: packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff	2011-06-19 15:15:27 UTC (rev 17532)
+++ packages/python-docutils/trunk/debian/patches/move-data-to-usr-share.diff	2011-06-19 15:18:26 UTC (rev 17533)
@@ -140,7 +140,7 @@
 +if _debian_package:
 +    def _datadir(path):
 +        dirname = os.path.dirname(path)
-+        prefix = os.path.join(os.path.dirname(__file__), '')
++        prefix = os.path.join(os.path.dirname(__file__), '') # _datadir
 +        assert path.startswith(prefix), "%r doesn't start with %r" % (path, prefix)
 +        suffix = dirname[len(prefix):]
 +        return os.path.join('/usr/share/docutils/', suffix)

Modified: packages/python-docutils/trunk/debian/rules
===================================================================
--- packages/python-docutils/trunk/debian/rules	2011-06-19 15:15:27 UTC (rev 17532)
+++ packages/python-docutils/trunk/debian/rules	2011-06-19 15:18:26 UTC (rev 17533)
@@ -30,6 +30,12 @@
 build: build-stamp
 build-stamp:
 	dh_testdir
+	# Check if move-data-to-usr-share.diff is up-to-date
+	if grep -r __file__ docutils/ | grep -vw _datadir; then \
+		echo "Error: Some uses of __file__ are not guarded by _datadir()." \
+			"Is move-data-to-usr-share.diff up-to-date?"; \
+		exit 1; \
+	fi
 	# Build modules for Python 2.X
 	$(PYTHON) setup.py build
 	# Build modules for Python 3.X in a separate directory




More information about the Python-modules-commits mailing list