summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAndy Smith <github@anarkystic.com>2012-01-19 20:33:00 -0800
committerAndy Smith <github@anarkystic.com>2012-01-19 20:33:00 -0800
commited8bf3b7066a7cf6e80d04ab82788cdb89ade3f2 (patch)
tree93a1812ff789681d2d0f54bd849c11c02fd248f9 /setup.py
parente34e694ee85c0c453a1779fe5f90fa6debae52e5 (diff)
parentf40198dece0b3729e6eb70abaa972bd73ee827da (diff)
Merge pull request #19 from 4P/basedocs
Basedocs
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index c8a3d750..fa418f31 100755
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,40 @@
+import os
+import subprocess
+
from setuptools import setup, find_packages
+# If Sphinx is installed on the box running setup.py,
+# enable setup.py to build the documentation, otherwise,
+# just ignore it
+cmdclass = {}
+try:
+ from sphinx.setup_command import BuildDoc
+
+ class local_BuildDoc(BuildDoc):
+ def run(self):
+ base_dir = os.path.dirname(os.path.abspath(__file__))
+ subprocess.Popen(["python", "generate_autodoc_index.py"],
+ cwd=os.path.join(base_dir, "docs")).communicate()
+ for builder in ['html', 'man']:
+ self.builder = builder
+ self.finalize_options()
+ BuildDoc.run(self)
+ cmdclass['build_sphinx'] = local_BuildDoc
+except:
+ # unable to import sphinx, politely skip past...
+ pass
+
+
setup(name='keystone',
version='2012.1',
description="Authentication service for OpenStack",
+ license='Apache License (2.0)',
author='OpenStack, LLC.',
author_email='openstack@lists.launchpad.net',
url='http://www.openstack.org',
packages=find_packages(exclude=['test', 'bin']),
scripts=['bin/keystone', 'bin/keystone-manage'],
zip_safe=False,
+ cmdclass=cmdclass,
install_requires=['setuptools'],
)