1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-10-18 00:42:17 +00:00

Replace distutils.dir_util.remove_tree() by shutil.rmtree().

In Python 3.10 and 3.11, distutils has been formally marked as deprecated.
Code that imports distutils will no longer work from Python 3.12.

I'm pretty sure distutils.dir_util.remove_tree() and shutil.rmtree() do
the same exact same thing and this should fix the issue :)
This commit is contained in:
Louis-Philippe Véronneau 2023-06-13 15:44:38 -04:00
parent abe0b79968
commit 4bc80bfce5
No known key found for this signature in database
GPG Key ID: F4257A50B21CFA85

View File

@ -7,7 +7,7 @@
import os.path
from distutils import dir_util
from shutil import rmtree
from setuptools import setup
from setuptools.command.sdist import sdist as _sdist
@ -19,7 +19,7 @@ class sdist(_sdist):
man_dir = os.path.join(base_dir, "man")
doctrees_dir = os.path.join(man_dir, ".doctrees")
self.spawn(["sphinx-build", "-q", "-b", "man", "docs", man_dir])
dir_util.remove_tree(doctrees_dir)
rmtree(doctrees_dir)
if __name__ == "__main__":