Don't use deprecated distutils module.
setup.py still uses the deprecated distutils module which will be removed in Python 3.12.
From What’s New In Python 3.10:
The entire
distutilspackage is deprecated, to be removed in Python 3.12. Its functionality for specifying package builds has already been completely replaced by third-party packagessetuptoolsandpackaging, and most other commonly used APIs are available elsewhere in the standard library (such asplatform,shutil,subprocessorsysconfig). There are no plans to migrate any other functionality fromdistutils, and applications that are using other functions should plan to make private copies of the code. Refer to PEP 632 for discussion.
Porting from Distutils suggests using setuptools instead of distutils.core.