Skip to content

distutils.spawn.find_executable to shutil.which #2210

@Lestropie

Description

@Lestropie

The MRtrix3 Python API depends on the distutils module for the find_executable() function. Apparently usage of this module is discouraged in favour of setuptools, and it is indeed intended for deprecation. But even then, with setuptools being to "download, build, install, upgrade, and uninstall Python packages", it's not necessarily a sensible dependency to have.

As of Python 3.3, the widely-used shutil module has the which() function, which serves the same purpose.

So if following through with #2047, I would suggest making the minimum dependency 3.3 (released Sep 2012), and making use of this function throughout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions