dhellmann / CommandLineApp (http://doughellmann.com/projects/CommandLineApp/)

The CommandLineApp class makes creating command line applications in Python as simple as defining callbacks to handle options when they appear in 'sys.argv'.

Changed (Δ732 bytes):

raw changeset »

MANIFEST.in (1 lines added, 0 lines removed)

docsource/history.rst (3 lines added, 0 lines removed)

pavement.py (24 lines added, 4 lines removed)

Up to file-list MANIFEST.in:

1
1
include setup.py
2
include paver-minilib.zip
2
3
include ChangeLog
3
4
include test_commandlineapp.py
4
5
recursive-include docs *.html *.txt *.css *.js *.png

Up to file-list docsource/history.rst:

2
2
History
3
3
#######
4
4
5
3.0.5
6
    - Fixed packaging problems that prevented installation with easy_install and pip.
7
5
8
3.0.4
6
9
    - Switched to sphinx for documentation.
7
10

Up to file-list pavement.py:

@@ -16,11 +16,17 @@ import paver.setuputils
16
16
paver.setuputils.install_distutils_tasks()
17
17
import paver.doctools
18
18
19
import nose
19
try:
20
    import nose
21
except ImportError:
22
    # We may not have nose during installation,
23
    # but that's OK because we just import it
24
    # to enable the test tasks.
25
    pass
20
26
21
27
# What project are we building?
22
28
PROJECT = 'CommandLineApp'
23
VERSION = '3.0.4'
29
VERSION = '3.0.5'
24
30
# The sphinx templates expect the VERSION in the shell environment
25
31
os.environ['VERSION'] = VERSION
26
32
@@ -84,6 +90,12 @@ options(
84
90
        sourcedir='docsource',
85
91
    ),
86
92
    
93
    # Tell Paver to include extra parts that we use
94
    # but it doesn't ship in the minilib by default.
95
    minilib = Bunch(
96
        extra_files=['doctools'],
97
    ),
98
    
87
99
)
88
100
89
101
def run_script(input_file, script_name, 
@@ -176,15 +188,23 @@ def clean_docs(options):
176
188
    """
177
189
178
190
@task
179
@needs(['cog', 'paver.doctools.html'])
180
191
def html(options):
181
192
    """Run sphinx to produce the documentation.
182
193
    """
194
    # First, fix up our path so cog can find the source
195
    current_path = os.environ.get('PYTHONPATH', '')
196
    updated_path = os.pathsep.join([os.getcwd(), current_path])
197
    os.environ['PYTHONPATH'] = updated_path
198
199
    paver.doctools.cog(options)
200
    paver.doctools.html(options)
201
    
202
    # Install the docs
183
203
    docs = path('docs')
184
204
    docs.rmtree()
185
205
    html = path(options.sphinx.docroot) / options.sphinx.builddir / 'html'
186
206
    html.copytree('docs')
187
    
207
    return
188
208
189
209
# @task
190
210
# def docs():