Skip to content

Commit 627ebc9

Browse files
committed
Move build_sphinx_man configuration to setup.cfg
1 parent 2ead56d commit 627ebc9

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ output_dir = bpython/translations
1919
[extract_messages]
2020
output_file = bpython/translations/bpython.pot
2121
msgid_bugs_address = https://github.com/bpython/bpython/issues
22+
23+
[build_sphinx_man]
24+
builder = man
25+
source_dir = doc/sphinx/source
26+
build_dir = build

setup.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,10 @@ def git_describe_to_python_version(version):
132132
cmdclass["init_catalog"] = babel.init_catalog
133133

134134
if using_sphinx:
135-
136-
class BuildDocMan(BuildDoc):
137-
def initialize_options(self):
138-
super().initialize_options()
139-
self.builder = "man"
140-
self.source_dir = "doc/sphinx/source"
141-
self.build_dir = "build"
142-
143135
build.sub_commands.insert(0, ("build_sphinx_man", None))
144-
cmdclass["build_sphinx_man"] = BuildDocMan
136+
cmdclass["build_sphinx_man"] = BuildDoc
145137

146-
if platform.system() in ["FreeBSD", "OpenBSD"]:
138+
if platform.system() in ("FreeBSD", "OpenBSD"):
147139
man_dir = "man"
148140
else:
149141
man_dir = "share/man"

0 commit comments

Comments
 (0)