diff --git a/bindep/depends.py b/bindep/depends.py index 3853251..5026a0b 100644 --- a/bindep/depends.py +++ b/bindep/depends.py @@ -22,7 +22,7 @@ from parsley import makeGrammar import platform import subprocess import sys -from packaging.version import parse as as_ver +from packaging.version import InvalidVersion, parse as as_ver import distro @@ -327,7 +327,13 @@ class Depends(object): # NOTE(toabctl): distro can be more than one string (i.e. "SUSE LINUX") codename = distro.codename().lower() release = distro.version().lower() - release_version = as_ver(release) + try: + release_version = as_ver(release) + except InvalidVersion: + # Rolling releases like Arch and Manjaro have no + # version. Ignore it and fail later if we actually need + # to check versions + release_version = None # NOTE(toabctl): space is a delimiter for bindep, so remove the spaces distro_id = "".join(distro_id.split()).lower() atoms = set([distro_id]) diff --git a/requirements.txt b/requirements.txt index 7a3dc49..2431d42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ distro<1.7.0 ; python_version < '3.6' distro>=1.7.0 ; python_version >= '3.6' pbr>=2.0.0 # Apache-2.0 Parsley -packaging<22.0 ; python_version >= '3.6' +packaging ; python_version >= '3.6' packaging<21.0 ; python_version < '3.6'