PythonOT/POT

Deprecate distutils in favor of setuptools

Closed this issue ยท 0 comments

๐Ÿš€ Feature

In CPython 3.10 distutils was formally marked as deprecated and it will be removed from CPython in 3.12. To avoid complications, deprecate use of distutils moving forward in favor of using setuptools as recommended.

For Python 3.7+ (which should by default have pip v22.0.0+ and setuptools v57.5.0+) use:

  • setuptools._distutils over distutils

Additional supporting advice given in:

Relevant for (nicely only!)

from distutils.errors import CompileError, LinkError

Motivation

Use of

from distutils.errors import CompileError, LinkError

fails in Python 3.12 given distutils is gone.

Pitch

Remove all use of distutils.

Alternatives

Additional context