Merge lp:~mordred/swift/sphinx-update-sphinx-config into lp:~hudson-openstack/swift/trunk

Proposed by Monty Taylor
Status: Work in progress
Proposed branch: lp:~mordred/swift/sphinx-update-sphinx-config
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 42 lines (+13/-2)
1 file modified
setup.py (+13/-2)
To merge this branch: bzr merge lp:~mordred/swift/sphinx-update-sphinx-config
Reviewer Review Type Date Requested Status
Swift Core security contacts Pending
Review via email: mp+31328@code.launchpad.net

Commit message

Drive sphinx version from setup.py

Description of the change

Added some code to setup.py to conditionally set the current version into
args for sphinx to consume.

To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Whoops. Found a problem.

Unmerged revisions

46. By Monty Taylor

Updated setup to drive the sphinx doc info from setup.py. No need to update
conf.py as well now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2010-07-28 23:02:51 +0000
3+++ setup.py 2010-07-29 20:49:39 +0000
4@@ -18,6 +18,7 @@
5 from setuptools.command.sdist import sdist
6 import os
7 import subprocess
8+from sphinx.setup_command import BuildDoc
9
10
11 class local_sdist(sdist):
12@@ -36,11 +37,20 @@
13
14
15 name = 'swift'
16-version = '1.0.2'
17+version = '1.0'
18+release = '1.0.2'
19+command_options={}
20
21+if "name=" in [f[0] for f in BuildDoc.user_options]:
22+ command_options={
23+ 'build_sphinx': {
24+ 'name': ('setup.py', name),
25+ 'version': ('setup.py', version),
26+ 'release': ('setup.py', release)}}
27+
28 setup(
29 name=name,
30- version=version,
31+ version=release,
32 description='Swift',
33 license='Apache License (2.0)',
34 author='OpenStack, LLC.',
35@@ -49,6 +59,7 @@
36 packages=find_packages(exclude=['test', 'bin']),
37 test_suite='nose.collector',
38 cmdclass={'sdist': local_sdist},
39+ command_options=command_options,
40 classifiers=[
41 'Development Status :: 4 - Beta',
42 'License :: OSI Approved :: Apache Software License',