Skip to content

Commit e47e6bd

Browse files
committed
Replace pkg_resources with packaging
Closes varietywalls#744
1 parent c4b9334 commit e47e6bd

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ To install Variety from source, you will need Git, Python 3.8+ and [distutils-ex
6363
- PyGObject, built with Cairo integration
6464
- ConfigObj
6565
- Pillow
66-
- pkg_resources (from setuptools)
66+
- packaging
6767
- Requests
6868
- *Optional*: httplib2 (for more quotes sources)
6969
- *Optional*: imagemagick (for wallpaper filters)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ requests
66
pygobject
77
pillow
88
httplib2
9+
packaging

variety/Util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,10 @@ def collapseuser(path):
765765

766766
@staticmethod
767767
def compare_versions(v1, v2):
768-
from pkg_resources import parse_version
768+
try:
769+
from packaging.version import parse as parse_version
770+
except ImportError:
771+
from pkg_resources import parse_version
769772

770773
pv1 = parse_version(v1)
771774
pv2 = parse_version(v2)

0 commit comments

Comments
 (0)