Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace imports of distutils. #385

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Oct 16, 2024

  1. Replace imports of distutils.

    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]>
    emollier committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    91617e0 View commit details
    Browse the repository at this point in the history