Skip to content

Commit

Permalink
Use looseversion in place of distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
hloeung committed Apr 2, 2024
1 parent 58ab965 commit 012b2d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charmhelpers/core/hookenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
# Charm Helpers Developers <[email protected]>

import copy
from distutils.version import LooseVersion
try:
from distutils.version import LooseVersion
except ImportError:
from looseversion import LooseVersion
from enum import Enum
from functools import wraps
from collections import namedtuple, UserDict
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Jinja2
netaddr

pbr!=2.1.0,>=2.0.0 # Apache-2.0

looseversion;python_version >= '3.12'

0 comments on commit 012b2d6

Please sign in to comment.