aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-01-13 10:13:21 +0100
committerMichał Górny <mgorny@gentoo.org>2013-01-13 10:13:21 +0100
commitff80e467ea875e4677fcc20c189ef730ef240a07 (patch)
treedaddb8f8443c8498efd124f26c72d0dbd48c12be
parent4e65bb6b49f85a311aac0b6225b7520388486ff5 (diff)
downloadmarkdown-ff80e467ea875e4677fcc20c189ef730ef240a07.tar.gz
markdown-ff80e467ea875e4677fcc20c189ef730ef240a07.tar.bz2
markdown-ff80e467ea875e4677fcc20c189ef730ef240a07.zip
Support disabling documentation build via --no-build-docs.
-rwxr-xr-xsetup.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 37410a4..3e6beb7 100755
--- a/setup.py
+++ b/setup.py
@@ -183,8 +183,19 @@ class build_docs(Command):
class md_build(build):
""" Run "build_docs" command from "build" command. """
+
+ user_options = build.user_options + [
+ ('no-build-docs', None, 'do not build documentation'),
+ ]
+
+ boolean_options = build.boolean_options + ['build-docs']
+
+ def initialize_options(self):
+ build.initialize_options(self)
+ self.no_build_docs = False
+
def has_docs(self):
- return True
+ return not self.no_build_docs
sub_commands = build.sub_commands + [('build_docs', has_docs)]