specific python version. The dependency will be substituted into your
package's control file wherever you place the token "${python:Depends}".
-If some modules need to be byte-compiled at build time, appropriate
+If some modules need to be byte-compiled at install time, appropriate
postinst and prerm scripts will be generated.
If you use this program, your package should build-depend on python.
if ("$python_version" eq "") {
error("Python is not installed, aborting. (Probably forgot to Build-Depend on python.)");
}
-elsif ($python_version =~ m/^Python\s+(\d+)\.(\d+)\.\d+\n$/) {
+elsif ($python_version =~ m/^Python\s+(\d+)\.(\d+)\.\d+/) {
$python_version = "$1.$2" ;
$python_major = $1 ;
} else {
}
$verdeps{$pyver} |= PY_MODULE if($deps & PY_MODULE);
}
- if ($verdeps{$pyver} & PY_MODULE) {
+ if ($verdeps{$pyver} & PY_MODULE && ! $dh{NOSCRIPTS}) {
autoscript($package,"postinst","postinst-python","s%#PYVER#%$pyver%;s%#DIRLIST#%$pydir%");
$need_prerm = 1;
}
}
- if ($need_prerm) {
+ if ($need_prerm && ! $dh{NOSCRIPTS}) {
autoscript($package,"prerm","prerm-python","s%#PACKAGE#%$package%");
}
}