mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-13 18:50:29 +03:00
Add support for Python 3.12
Python 3.12 completely removed the builtin `distutils` module. This commit replaces its use with the `packaging` package, which is an external dependency, but maintained by the Python developers. Signed-off-by: Andrew Gunnerson <accounts+gitlab@chiller3.com>
This commit is contained in:
parent
2fb8fc4879
commit
679ba6f552
5 changed files with 16 additions and 15 deletions
|
|
@ -21,7 +21,7 @@ import yaml
|
|||
import zipfile
|
||||
import textwrap
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
from packaging.version import Version
|
||||
from pathlib import Path
|
||||
from testcommon import TmpCwd, mkdtemp
|
||||
from unittest import mock
|
||||
|
|
@ -1041,7 +1041,7 @@ class UpdateTest(unittest.TestCase):
|
|||
|
||||
javac = config['jarsigner'].replace('jarsigner', 'javac')
|
||||
v = subprocess.check_output([javac, '-version'], stderr=subprocess.STDOUT)[6:-1].decode('utf-8')
|
||||
if LooseVersion(v) < LooseVersion('1.8.0_132'):
|
||||
if Version(v) < Version('1.8.0_132'):
|
||||
print('SKIPPING: running tests with old Java (' + v + ')')
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue