+debhelper (4.1.63) unstable; urgency=low
+
+ * dh_python: patch from Josselin to fix generated depends. Closes: #204717
+ * dh_pythn: also stylistic and tab damage fixes
+
+ -- Joey Hess <joeyh@debian.org> Mon, 11 Aug 2003 15:33:16 -0400
+
debhelper (4.1.62) unstable; urgency=low
* Fix a bug in quoted section parsing that put the quotes in the parsed
delsubstvar($package, "python:Depends");
- # Check for current python dependencies
my @dirs = ("usr/lib/site-python", "usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV );
+
+ my $dep_on_python = 0;
+ my $strong_dep = 0;
+ my $look_for_pythonXY = 1;
+
+ # First, the case of python-foo
+ if ($package =~ /^python-/) {
+ $dep_on_python = 1;
+ $strong_dep = 1;
+ my $pack = $package;
+ $pack =~ s/^python/python$python_version/;
+ if (grep { "$_" eq "$pack" } GetPackages()) {
+ addsubstvar($package, "python:Depends", $pack);
+ }
+ else {
+ push @dirs, "usr/lib/python$python_version/site-packages" ;
+ $look_for_pythonXY = 0;
+ }
+ }
+
@dirs = grep -d, map "$tmp/$_", @dirs;
my $deps = 0;
}
# Dependencies on current python
- my $dep_on_python = 0;
- my $strong_dep = 0;
$dep_on_python = 1 if $deps;
$strong_dep = 1 if($deps & PY_MODULE);
- if ($package =~ /^python-/) {
- my $pack = $package;
- $pack =~ s/^python/python$python_version/;
- if (grep { "$_" eq "$pack" } GetPackages()) {
- addsubstvar($package, "python:Depends", $pack);
- $dep_on_python = 1;
- $strong_dep = 1;
- }
- }
+
if ($dep_on_python) {
addsubstvar($package, "python:Depends", $python, ">= $python_version");
if ($strong_dep) {
# Look for specific pythonX.Y modules
foreach my $pyver (@python_allversions) {
my $pydir="/usr/lib/$pyver/site-packages";
- if (grep -d,"$tmp$pydir") {
- find sub {
- return unless -f;
- $verdeps{$pyver} |= PY_MODULE if /\.py$/;
- }, "$tmp$pydir";
+ if ($look_for_pythonXY) {
+ if (grep -d,"$tmp$pydir") {
+ find sub {
+ return unless -f;
+ $verdeps{$pyver} |= PY_MODULE if /\.py$/;
+ }, "$tmp$pydir";
+ }
}
-
+
# Go for the dependencies
addsubstvar($package, "python:Depends", $pyver) if $verdeps{$pyver};