[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][lintian/lintian][master] Update check for dependency on python3-numpy-abi



Title: GitLab

Louis-Philippe Véronneau pushed to branch master at lintian / lintian

Commits:

  • 98164462
    by Maytham Alsudany at 2025-03-28T17:13:08+00:00
    Update check for dependency on python3-numpy-abi
    
    The release of NumPy 2 means that the name of the virtual package has
    changed from python3-numpy-abiN to python3-numpy2-abiN. This commit
    updates the check to account for this change.
    
    This commit also updates the check to allow an alternative dependency
    specifically on "python3-numpy2-abi0 | python3-numpy-abi9", since the
    first ABI release of NumPy 2 is backwards compatible with the last ABI
    release of NumPy 1, and this is what dh_numpy generates.
    
    The ability to add a strict dependency on python3-numpy without
    depending on the -abi package has been removed, since this practise is
    obsolete and it's preferred to depend on the -abi package instead.
    
    Closes: #1094364
    

1 changed file:

Changes:

  • lib/Lintian/Check/Binaries/Prerequisites/Numpy.pm
    ... ... @@ -74,22 +74,20 @@ sub installable {
    74 74
     
    
    75 75
         my $depends = $self->processable->relation('strong');
    
    76 76
     
    
    77
    -    # Check for dependency on python3-numpy-abiN dependency (or strict
    
    78
    -    # versioned dependency on python3-numpy)
    
    77
    +    # Check for dependency on python3-numpy-abiN dependency
    
    79 78
         # We do not allow alternatives as it would mostly likely
    
    80 79
         # defeat the purpose of this relation.  Also, we do not allow
    
    81 80
         # versions for -abi as it is a virtual package.
    
    82 81
         $self->hint('missing-dependency-on-numpy-abi')
    
    83 82
           if $self->uses_numpy_c_abi
    
    84
    -      && !$depends->matches(qr/^python3?-numpy-abi\d+$/,
    
    85
    -        Lintian::Relation::VISIT_OR_CLAUSE_FULL)
    
    86 83
           && (
    
    87
    -        !$depends->matches(
    
    88
    -            qr/^python3-numpy \(>[>=][^\|]+$/,
    
    89
    -            Lintian::Relation::VISIT_OR_CLAUSE_FULL
    
    90
    -        )
    
    91
    -        || !$depends->matches(
    
    92
    -            qr/^python3-numpy \(<[<=][^\|]+$/,
    
    84
    +        !$depends->matches(qr/^python3-numpy2?-abi\d+$/,
    
    85
    +            Lintian::Relation::VISIT_OR_CLAUSE_FULL)
    
    86
    +        # First ABI release of NumPy 2 is backwards-compatible with the last
    
    87
    +        # ABI release on NumPy 1, therefore the following is permittied; see
    
    88
    +        # Bug#1094364
    
    89
    +        && !$depends->matches(
    
    90
    +            qr/^python3-numpy2-abi0 | python3-numpy-abi9$/,
    
    93 91
                 Lintian::Relation::VISIT_OR_CLAUSE_FULL
    
    94 92
             )
    
    95 93
           )
    


  • Reply to: