diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-02-10 08:49:55 -0400 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-02-10 08:49:55 -0400 |
| commit | 624bf51eebf1f589e31191b3e2b2cbdfbea25b42 (patch) | |
| tree | c11200af539f91ef10ca4ed140280a45c86a9f75 /setup.py | |
| parent | 16ffc15b1fb45a09de14cece6b382357a030b9dc (diff) | |
| parent | 5e66cf492f150bfbd01e5983d876192c5b158343 (diff) | |
| download | nova-624bf51eebf1f589e31191b3e2b2cbdfbea25b42.tar.gz nova-624bf51eebf1f589e31191b3e2b2cbdfbea25b42.tar.xz nova-624bf51eebf1f589e31191b3e2b2cbdfbea25b42.zip | |
trunk merge
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -21,7 +21,6 @@ import subprocess from setuptools import setup, find_packages from setuptools.command.sdist import sdist -from sphinx.setup_command import BuildDoc from nova.utils import parse_mailmap, str_dict_replace from nova import version @@ -34,14 +33,6 @@ if os.path.isdir('.bzr'): version_file.write(vcsversion) -class local_BuildDoc(BuildDoc): - def run(self): - for builder in ['html', 'man']: - self.builder = builder - self.finalize_options() - BuildDoc.run(self) - - class local_sdist(sdist): """Customized sdist hook - builds the ChangeLog file from VC first""" @@ -57,9 +48,23 @@ class local_sdist(sdist): with open("ChangeLog", "w") as changelog_file: changelog_file.write(str_dict_replace(changelog, mailmap)) sdist.run(self) +nova_cmdclass = {'sdist': local_sdist} + + +try: + from sphinx.setup_command import BuildDoc + + class local_BuildDoc(BuildDoc): + def run(self): + for builder in ['html', 'man']: + self.builder = builder + self.finalize_options() + BuildDoc.run(self) + nova_cmdclass['build_sphinx'] = local_BuildDoc + +except: + pass -nova_cmdclass = {'sdist': local_sdist, - 'build_sphinx': local_BuildDoc} try: from babel.messages import frontend as babel |
