[Python-apps-commits] r10229 - in packages/mercurial/trunk/debian (changelog rules)

mithrandi at users.alioth.debian.org mithrandi at users.alioth.debian.org
Sat Dec 7 23:12:22 UTC 2013


    Date: Saturday, December 7, 2013 @ 23:12:20
  Author: mithrandi
Revision: 10229

* Fix installation in the case where there is more than one supported
  version of Python (Closes: #729153).
  - Thanks to Faheem Mitha <faheem at faheem.info> for the patch.

Modified:
  packages/mercurial/trunk/debian/changelog
  packages/mercurial/trunk/debian/rules

Modified: packages/mercurial/trunk/debian/changelog
===================================================================
--- packages/mercurial/trunk/debian/changelog	2013-12-07 22:30:13 UTC (rev 10228)
+++ packages/mercurial/trunk/debian/changelog	2013-12-07 23:12:20 UTC (rev 10229)
@@ -1,6 +1,9 @@
 mercurial (2.8.1-2) UNRELEASED; urgency=low
 
   * Pass -f to rm so that repeated builds succeed (Closes: #731623).
+  * Fix installation in the case where there is more than one supported
+    version of Python (Closes: #729153).
+    - Thanks to Faheem Mitha <faheem at faheem.info> for the patch.
 
  -- Tristan Seligmann <mithrandi at debian.org>  Sun, 08 Dec 2013 00:28:56 +0200
 

Modified: packages/mercurial/trunk/debian/rules
===================================================================
--- packages/mercurial/trunk/debian/rules	2013-12-07 22:30:13 UTC (rev 10228)
+++ packages/mercurial/trunk/debian/rules	2013-12-07 23:12:20 UTC (rev 10229)
@@ -8,6 +8,7 @@
 	dh $@ --with python2,bash-completion
 
 PYVERS=$(shell pyversions -vs)
+PYVER_DEFAULT=$(shell pyversions -vd)
 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 override_dh_auto_build:
@@ -77,8 +78,16 @@
 		debian/cacerts.hgrc \
 		$(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/cacerts.rc
 	# Move templates and help installed by setup.py to their FHS-correct location
-	mv $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/templates $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/help $(CURDIR)/debian/mercurial-common/usr/share/mercurial
-	mv $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/locale $(CURDIR)/debian/mercurial-common/usr/share
+	mv $(CURDIR)/debian/mercurial-common/usr/lib/python$(PYVER_DEFAULT)/dist-packages/mercurial/templates \
+	   $(CURDIR)/debian/mercurial-common/usr/lib/python$(PYVER_DEFAULT)/dist-packages/mercurial/help \
+	   $(CURDIR)/debian/mercurial-common/usr/share/mercurial
+	mv $(CURDIR)/debian/mercurial-common/usr/lib/python$(PYVER_DEFAULT)/dist-packages/mercurial/locale \
+	   $(CURDIR)/debian/mercurial-common/usr/share
+	# If more than one Python version is supported, clean up the templates
+	# and help installed for the other versions
+	-rm -rf $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/templates \
+	        $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/help \
+	        $(CURDIR)/debian/mercurial-common/usr/lib/python*/dist-packages/mercurial/locale \
 	# remove arch-dependent python stuff
 	find debian/mercurial-common/usr/lib \
 		-name '*.so' ! -type d -delete , \
@@ -96,7 +105,7 @@
 
 override_dh_clean:
 	dh_clean
-	rm -f tests/test-check-pyflakes.t
+	-rm -f tests/test-check-pyflakes.t
 
 mercurial/__version__.py:
 	@echo "$@ is missing (you probably call 'make clean' directly)."




More information about the Python-apps-commits mailing list