File: setup.py

package info (click to toggle)
supysonic 0.7.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,716 kB
  • sloc: python: 9,315; sql: 1,029; sh: 25; makefile: 19; javascript: 6
file content (28 lines) | stat: -rw-r--r-- 763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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 distutils import dir_util
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])
        dir_util.remove_tree(doctrees_dir)


if __name__ == "__main__":
    setup(
        cmdclass={"sdist": sdist},
    )