Require packaging

Apparently distutils.version.LooseVersion does not supply a version
attribute in newer Python stdlib. The code we have already prefers
packaging.version.parse over it anyway if packaging is installed, so
declare it as an actual requirement. Clean up the old distutils
alternative now that it should no longer be called.

Change-Id: I9409f2b0e076e5def3fffb1149665df71c0c5508
This commit is contained in:
Jeremy Stanley 2021-10-01 23:34:24 +00:00
parent 53bf817ffc
commit d0fba55d50
2 changed files with 2 additions and 5 deletions

View File

@ -22,11 +22,7 @@ from parsley import makeGrammar
import platform
import subprocess
import sys
# packaging is newer, usually available but not guaranteed
try:
from packaging.version import parse as as_ver
except ImportError:
from distutils.version import LooseVersion as as_ver
from packaging.version import parse as as_ver
import distro

View File

@ -1,3 +1,4 @@
distro
pbr>=2.0.0 # Apache-2.0
Parsley
packaging