Skip to content

Commit

Permalink
Avoid deprecated distutils module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Nov 13, 2023
1 parent 74190ae commit 4e71d6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: apt-update
run: sudo apt-get update -qq
- name: apt-install
run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-setuptools graphviz xvfb twine
run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-packaging python3-setuptools graphviz xvfb twine
- name: build
run: python3 setup.py sdist
- name: test
Expand All @@ -28,7 +28,7 @@ jobs:
- name: apt-update
run: sudo apt-get update -qq
- name: apt-install
run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-setuptools graphviz xvfb twine
run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-packaging python3-setuptools graphviz xvfb twine
- name: build
run: python3 setup.py sdist
- name: test
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

install_requires=[
'PyGObject',
'numpy'
'numpy',
'packaging'.
],
)
4 changes: 2 additions & 2 deletions xdot/ui/_xdotparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re
import sys

from distutils.version import LooseVersion
from packaging.version import Version

from ..dot.lexer import DotLexer
from ..dot.parser import DotParser
Expand Down Expand Up @@ -264,7 +264,7 @@ def __init__(self, xdotcode, graphviz_version=None):
# https://github.com/jrfonseca/xdot.py/issues/92
self.broken_backslashes = False
if graphviz_version is not None and \
LooseVersion(graphviz_version) < LooseVersion("2.46.0"):
Version(graphviz_version) < Version("2.46.0"):
self.broken_backslashes = True

self.nodes = []
Expand Down

0 comments on commit 4e71d6f

Please sign in to comment.