Skip to content

Commit e944019

Browse files
authored
Removed packaging.version as a dependency in test_other.py (#27152)
Removes the dependency on python3-packaging in test_other.py which was introduced in #27065
1 parent 25e4e8d commit e944019

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

test/test_other.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
from pathlib import Path
2828
from subprocess import PIPE, STDOUT
2929

30-
from packaging.version import Version
31-
3230
if __name__ == '__main__':
3331
raise Exception('do not run this file directly; do something like: test/runner other')
3432

@@ -947,10 +945,10 @@ def test_cxx_import(self, args):
947945

948946
@requires_ninja
949947
def test_cmake_cxx_import_std(self):
950-
cmake_minimum = '3.30'
948+
cmake_minimum = (3, 30)
951949
output = self.run_process([EMCMAKE, 'cmake', '--version'], stdout=PIPE).stdout
952950
cmake_version = re.search(r'^cmake version (\d+(?:\.\d+)*)', output).group(1)
953-
if Version(cmake_version) < Version(cmake_minimum):
951+
if tuple(map(int, cmake_version.split('.'))) < cmake_minimum:
954952
self.skipTest(f'CMake > {cmake_minimum} required ({cmake_version})')
955953

956954
self.run_process([EMCMAKE, 'cmake', '-GNinja', test_file('cmake/cxx_import_std')])

0 commit comments

Comments
 (0)