From b0eec920e2d5fe60d461fc4efe2b06637b61cb04 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry@gmail.com>
Date: Wed, 19 Mar 2025 19:07:38 -0600
Subject: Use packaging.version instead of distutils.version
Origin: upstream, https://github.com/matthew-brett/texext/pull/17
Forwarded: not-needed

---
 test-requirements.txt              | 1 +
 texext/tests/plotdirective/conf.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

--- texext.orig/test-requirements.txt
+++ texext/test-requirements.txt
@@ -2,5 +2,6 @@
 -r requirements.txt
 sympy>=1.0
 matplotlib>=3.1
+packaging
 pytest
 sphinxtesters>=0.2.3
--- texext.orig/texext/tests/plotdirective/conf.py
+++ texext/texext/tests/plotdirective/conf.py
@@ -15,7 +15,7 @@
 import sys
 from os.path import join as pjoin, abspath
 import sphinx
-from distutils.version import LooseVersion
+import packaging.version as pkgv
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -104,7 +104,7 @@
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-if LooseVersion(sphinx.__version__) >= LooseVersion('1.3'):
+if pkgv.parse(sphinx.__version__) >= pkgv.parse('1.3'):
     html_theme = 'classic'
 else:
     html_theme = 'default'
