File: drop_distutils

package info (click to toggle)
texext 0.6.7-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 760 kB
  • sloc: python: 1,946; makefile: 15
file content (41 lines) | stat: -rw-r--r-- 1,354 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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'