mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-13 21:52:18 +00:00
4bc80bfce5
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 :)
29 lines
744 B
Python
29 lines
744 B
Python
# This file is part of Supysonic.
|
|
# Supysonic is a Python implementation of the Subsonic server API.
|
|
#
|
|
# Copyright (C) 2013-2021 Alban 'spl0k' Féron
|
|
#
|
|
# Distributed under terms of the GNU AGPLv3 license.
|
|
|
|
import os.path
|
|
|
|
from shutil import rmtree
|
|
from setuptools import setup
|
|
from setuptools.command.sdist import sdist as _sdist
|
|
|
|
|
|
class sdist(_sdist):
|
|
def make_release_tree(self, base_dir, files):
|
|
super().make_release_tree(base_dir, files)
|
|
|
|
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])
|
|
rmtree(doctrees_dir)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
setup(
|
|
cmdclass={"sdist": sdist},
|
|
)
|