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

hertzog at users.alioth.debian.org hertzog at users.alioth.debian.org
Tue Jul 22 22:39:20 UTC 2014


    Date: Tuesday, July 22, 2014 @ 22:39:19
  Author: hertzog
Revision: 29871

* Drop extra license files.
* Fix shebang lines in python3-django.
* Drop empty left-over /usr/bin directories in python-django/python3-django.

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

Modified: packages/python-django/trunk/debian/changelog
===================================================================
--- packages/python-django/trunk/debian/changelog	2014-07-22 22:28:37 UTC (rev 29870)
+++ packages/python-django/trunk/debian/changelog	2014-07-22 22:39:19 UTC (rev 29871)
@@ -5,6 +5,9 @@
   * Drop conflicting django-admin in python-django and python3-django that
     were not removed as usual because upstream stopped installing them as
     django-admin.py.
+  * Drop extra license files.
+  * Fix shebang lines in python3-django.
+  * Drop empty left-over /usr/bin directories in python-django/python3-django.
 
  -- Raphaël Hertzog <hertzog at debian.org>  Tue, 22 Jul 2014 23:29:30 +0200
 

Modified: packages/python-django/trunk/debian/rules
===================================================================
--- packages/python-django/trunk/debian/rules	2014-07-22 22:28:37 UTC (rev 29870)
+++ packages/python-django/trunk/debian/rules	2014-07-22 22:39:19 UTC (rev 29871)
@@ -38,17 +38,25 @@
 	# backup~ is used in tests
 	dh_clean -Xbackup~
 
-override_dh_install:
-	dh_install
-	
-	# Fix permissions
-	chmod 644 $(PREFIXC)/etc/bash_completion.d/django_bash_completion
-	chmod 755 $(PREFIXC)/usr/bin/django-admin
-	
-	# django-admin is in python-django-common
+override_dh_auto_install:
+	dh_auto_install
+
+	# Drop extra license files
+	find $(PREFIX) -name LICENSE -o -name license.txt -o -name license.python.txt | \
+	    xargs --no-run-if-empty rm
+	find $(PREFIX3) -name LICENSE -o -name license.txt -o -name license.python.txt | \
+	    xargs --no-run-if-empty rm
+
+	# Drop django-admin{,.py} which is in python-django-common and
+	# clean up empty parent directories
 	rm $(PREFIX)/usr/bin/django-admin*
 	rm $(PREFIX3)/usr/bin/django-admin*
-	
+	rmdir --ignore-fail-on-non-empty --parents $(PREFIX)/usr/bin $(PREFIX3)/usr/bin
+
+	# Fix the shebang lines to use python3 in python3-django
+	find $(PREFIX3) -name django-admin.py -or -name manage.py | \
+	    xargs --no-run-if-empty sed -i -e '1s/python$$/python3/'
+
 	# Remove embedded Javascript libraries
 	set -e; for FILENAME in jquery.js jquery.min.js; do \
 		find $(PREFIX) -name $$FILENAME -exec \
@@ -57,6 +65,13 @@
 			ln -sf /usr/share/javascript/jquery/$$FILENAME {} \;; \
 	done
 
+override_dh_install:
+	dh_install
+	
+	# Fix permissions
+	chmod 644 $(PREFIXC)/etc/bash_completion.d/django_bash_completion
+	chmod 755 $(PREFIXC)/usr/bin/django-admin
+
 override_dh_python3:
 	dh_python3
 	find debian/python3-django/usr/lib/python3/dist-packages/ -type f -not -name '*.py' | \




More information about the Python-modules-commits mailing list