pip: fix bug with parsing requirements

When parsing the pip report, parsing some requirements could fail, as the packaging library used for the parsing was different from the one used by pip internally.

This makes sure that always the pip internals packaging library is used, which should prevent inconsistencies like that.
This commit is contained in:
DavHau 2023-08-22 12:42:25 +02:00
parent 3dd23864cb
commit 66658fb429

View File

@ -1,10 +1,8 @@
import os
import sys
import subprocess
import json
from pathlib import Path
from packaging.requirements import Requirement
from pip._vendor.packaging.requirements import Requirement
from packaging.utils import (
canonicalize_name,
)