|
6 | 6 | import subprocess
|
7 | 7 |
|
8 | 8 | from setuptools import setup
|
9 |
| -from distutils.command.build import build |
| 9 | +from distutils.command.build_py import build_py |
10 | 10 |
|
11 | 11 | try:
|
12 | 12 | from babel.messages import frontend as babel
|
@@ -122,23 +122,23 @@ def git_describe_to_python_version(version):
|
122 | 122 | vf.write(f'__version__ = "{version}"\n')
|
123 | 123 |
|
124 | 124 |
|
125 |
| -cmdclass = {"build": build} |
| 125 | +cmdclass = {"build_py": build_py} |
126 | 126 |
|
127 | 127 | from bpython import package_dir, __author__
|
128 | 128 |
|
129 | 129 | translations_dir = os.path.join(package_dir, "translations")
|
130 | 130 |
|
131 | 131 | # localization options
|
132 | 132 | if using_translations:
|
133 |
| - build.sub_commands.insert(0, ("compile_catalog", None)) |
| 133 | + build_py.sub_commands.insert(0, ("compile_catalog", None)) |
134 | 134 |
|
135 | 135 | cmdclass["compile_catalog"] = babel.compile_catalog
|
136 | 136 | cmdclass["extract_messages"] = babel.extract_messages
|
137 | 137 | cmdclass["update_catalog"] = babel.update_catalog
|
138 | 138 | cmdclass["init_catalog"] = babel.init_catalog
|
139 | 139 |
|
140 | 140 | if using_sphinx:
|
141 |
| - build.sub_commands.insert(0, ("build_sphinx_man", None)) |
| 141 | + build_py.sub_commands.insert(0, ("build_sphinx_man", None)) |
142 | 142 | cmdclass["build_sphinx_man"] = BuildDoc
|
143 | 143 |
|
144 | 144 | if platform.system() in ("FreeBSD", "OpenBSD"):
|
|
0 commit comments