Skip to content

Conversation

@emollier
Copy link

As reported in Debian bug #1083070, the Python module distutils is going to be removed entirely from the upcoming Debian release, following the deprecation on Python side of the distutils module. Removal of distutils is causing test failures in bmtk though:

Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/simulator/filternet/test_filternet_movies.py:5: in <module>
    from bmtk.utils.sim_setup import build_env_filternet
/usr/lib/python3/dist-packages/bmtk/utils/sim_setup.py:32: in <module>
    from distutils.dir_util import copy_tree
E   ModuleNotFoundError: No module named 'distutils'

These changes replace copy_tree invocations by shutil.copytree, with the option to clobber existing directories by default, as otherwise the refusal of erasing the target directory will cause other test regressions. The version sort invocation perusing LooseVersion is replaced by invocations of the bare packaging.version.Version.

As reported in [Debian bug #1083070], the Python module distutils is
going to be removed entirely from the upcoming Debian release,
following the deprecation on Python side of the distutils module.
Removal of distutils is causing test failures in bmtk though:

	Traceback:
	/usr/lib/python3.12/importlib/__init__.py:90: in import_module
	    return _bootstrap._gcd_import(name[level:], package, level)
	tests/simulator/filternet/test_filternet_movies.py:5: in <module>
	    from bmtk.utils.sim_setup import build_env_filternet
	/usr/lib/python3/dist-packages/bmtk/utils/sim_setup.py:32: in <module>
	    from distutils.dir_util import copy_tree
	E   ModuleNotFoundError: No module named 'distutils'

These changes replace copy_tree invocations by shutil.copytree, with
the option to clobber existing directories by default, as otherwise
the refusal of erasing the target directory will cause other test
regressions.  The version sort invocation perusing LooseVersion is
replaced by invocations of the bare packaging.version.Version.

[Debian bug #1083070]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083070

Signed-off-by: Étienne Mollier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant