]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_python
Fix typo in French translation, about debian/package.README.Debian files.
[debhelper.git] / dh_python
index 6a1f78f154f34e248f24794466011d8cbb24d54a..857504f7163c09879107ea15b6267cee78f5013b 100755 (executable)
--- a/dh_python
+++ b/dh_python
@@ -16,6 +16,10 @@ B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module di
 
 =head1 DESCRIPTION
 
+Note: This program is deprecated. You should use dh_pysupport or
+dh_pycentral instead. This program will do nothing if debian/pycompat
+or a Python-Version control file field exists.
+
 dh_python is a debhelper program that is responsible for generating the
 ${python:Depends} substitutions and adding them to substvars files. It
 will also add a postinst and a prerm script if required.
@@ -69,6 +73,18 @@ Python policy, version 0.3.7
 
 init();
 
+if (-e "debian/pycompat") {
+       warning("Doing nothing since dh_pycompat exists; dh_pysupport or dh_pycentral should do the work. You can remove dh_python from your rules file.");
+       exit 0;
+}
+elsif (`grep Python-Version: debian/control`) {
+       warning("Doing nothing since Python-Version is set; dh_pysupport or dh_pycentral should do the work. You can remove dh_python from your rules file.");
+       exit 0;
+}
+else {
+       warning("This program is deprecated, you should use dh_pysupport or dh_pycentral instead.");
+}
+
 my $python = 'python';
 
 # The current python major version