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
=== modified file 'setup.py'
--- setup.py 2010-07-28 23:02:51 +0000
+++ setup.py 2010-07-29 20:49:39 +0000
@@ -18,6 +18,7 @@
18from setuptools.command.sdist import sdist18from setuptools.command.sdist import sdist
19import os19import os
20import subprocess20import subprocess
21from sphinx.setup_command import BuildDoc
2122
2223
23class local_sdist(sdist):24class local_sdist(sdist):
@@ -36,11 +37,20 @@
3637
3738
38name = 'swift'39name = 'swift'
39version = '1.0.2'40version = '1.0'
41release = '1.0.2'
42command_options={}
4043
44if "name=" in [f[0] for f in BuildDoc.user_options]:
45 command_options={
46 'build_sphinx': {
47 'name': ('setup.py', name),
48 'version': ('setup.py', version),
49 'release': ('setup.py', release)}}
50
41setup(51setup(
42 name=name,52 name=name,
43 version=version,53 version=release,
44 description='Swift',54 description='Swift',
45 license='Apache License (2.0)',55 license='Apache License (2.0)',
46 author='OpenStack, LLC.',56 author='OpenStack, LLC.',
@@ -49,6 +59,7 @@
49 packages=find_packages(exclude=['test', 'bin']),59 packages=find_packages(exclude=['test', 'bin']),
50 test_suite='nose.collector',60 test_suite='nose.collector',
51 cmdclass={'sdist': local_sdist},61 cmdclass={'sdist': local_sdist},
62 command_options=command_options,
52 classifiers=[63 classifiers=[
53 'Development Status :: 4 - Beta',64 'Development Status :: 4 - Beta',
54 'License :: OSI Approved :: Apache Software License',65 'License :: OSI Approved :: Apache Software License',