summaryrefslogtreecommitdiff
path: root/pavement.py
diff options
context:
space:
mode:
Diffstat (limited to 'pavement.py')
-rw-r--r--pavement.py98
1 files changed, 49 insertions, 49 deletions
diff --git a/pavement.py b/pavement.py
index 16cc9fb..ec13526 100644
--- a/pavement.py
+++ b/pavement.py
@@ -3,12 +3,12 @@ from paver import doctools # noqa
from paver.setuputils import setup # noqa
options(
- sphinx=Bunch(builddir=".build"),
+ sphinx=Bunch(builddir='.build'),
)
def sphinx_builddir(options):
- return path("docs") / options.sphinx.builddir / "html"
+ return path('docs') / options.sphinx.builddir / 'html'
@task
@@ -17,68 +17,68 @@ def clean_docs(options):
@task
-@needs("clean_docs", "paver.doctools.html")
+@needs('clean_docs', 'paver.doctools.html')
def html(options):
- destdir = path("Documentation")
+ destdir = path('Documentation')
destdir.rmtree()
builtdocs = sphinx_builddir(options)
builtdocs.move(destdir)
@task
-@needs("paver.doctools.html")
+@needs('paver.doctools.html')
def qhtml(options):
- destdir = path("Documentation")
+ destdir = path('Documentation')
builtdocs = sphinx_builddir(options)
- sh("rsync -az %s/ %s" % (builtdocs, destdir))
+ sh('rsync -az %s/ %s' % (builtdocs, destdir))
@task
-@needs("clean_docs", "paver.doctools.html")
+@needs('clean_docs', 'paver.doctools.html')
def ghdocs(options):
builtdocs = sphinx_builddir(options)
- sh("git checkout gh-pages && \
+ sh('git checkout gh-pages && \
cp -r %s/* . && \
- git commit . -m 'Rendered documentation for Github Pages.' && \
+ git commit . -m "Rendered documentation for Github Pages." && \
git push origin gh-pages && \
- git checkout master" % builtdocs)
+ git checkout master' % builtdocs)
@task
-@needs("clean_docs", "paver.doctools.html")
+@needs('clean_docs', 'paver.doctools.html')
def upload_pypi_docs(options):
- builtdocs = path("docs") / options.builddir / "html"
- sh("python setup.py upload_sphinx --upload-dir='%s'" % (builtdocs))
+ builtdocs = path('docs') / options.builddir / 'html'
+ sh('python setup.py upload_sphinx --upload-dir="%s"' % (builtdocs))
@task
-@needs("upload_pypi_docs", "ghdocs")
+@needs('upload_pypi_docs', 'ghdocs')
def upload_docs(options):
pass
@task
def autodoc(options):
- sh("contrib/release/doc4allmods librabbitmq")
+ sh('contrib/release/doc4allmods librabbitmq')
@task
def verifyindex(options):
- sh("contrib/release/verify-reference-index.sh")
+ sh('contrib/release/verify-reference-index.sh')
@task
def clean_readme(options):
- path("README").unlink()
- path("README.rst").unlink()
+ path('README').unlink()
+ path('README.rst').unlink()
@task
-@needs("clean_readme")
+@needs('clean_readme')
def readme(options):
- sh("python contrib/release/sphinx-to-rst.py docs/templates/readme.txt \
- > README.rst")
- sh("ln -sf README.rst README")
+ sh('python contrib/release/sphinx-to-rst.py docs/templates/readme.txt \
+ > README.rst')
+ sh('ln -sf README.rst README')
@task
@@ -89,18 +89,18 @@ def bump(options):
@task
@cmdopts([
- ("coverage", "c", "Enable coverage"),
- ("quick", "q", "Quick test"),
- ("verbose", "V", "Make more noise"),
+ ('coverage', 'c', 'Enable coverage'),
+ ('quick', 'q', 'Quick test'),
+ ('verbose', 'V', 'Make more noise'),
])
def test(options):
- cmd = "nosetests"
- if getattr(options, "coverage", False):
- cmd += " --with-coverage3"
- if getattr(options, "quick", False):
- cmd = "QUICKTEST=1 SKIP_RLIMITS=1 %s" % cmd
- if getattr(options, "verbose", False):
- cmd += " --verbosity=2"
+ cmd = 'nosetests'
+ if getattr(options, 'coverage', False):
+ cmd += ' --with-coverage3'
+ if getattr(options, 'quick', False):
+ cmd = 'QUICKTEST=1 SKIP_RLIMITS=1 %s' % cmd
+ if getattr(options, 'verbose', False):
+ cmd += ' --verbosity=2'
sh(cmd)
@@ -111,26 +111,26 @@ def funtest(options):
@task
@cmdopts([
- ("noerror", "E", "Ignore errors"),
+ ('noerror', 'E', 'Ignore errors'),
])
def flake8(options):
- noerror = getattr(options, "noerror", False)
- sh("""flake8 librabbitmq""", ignore_error=noerror)
+ noerror = getattr(options, 'noerror', False)
+ sh('flake8 librabbitmq' ignore_error=noerror)
@task
@cmdopts([
- ("noerror", "E", "Ignore errors"),
+ ('noerror', 'E', 'Ignore errors'),
])
def flakeplus(options):
- noerror = getattr(options, "noerror", False)
- sh("python contrib/release/flakeplus.py librabbitmq",
+ noerror = getattr(options, 'noerror', False)
+ sh('python contrib/release/flakeplus.py librabbitmq',
ignore_error=noerror)
@task
@cmdopts([
- ("noerror", "E", "Ignore errors"),
+ ('noerror', 'E', 'Ignore errors'),
])
def flakes(options):
flake8(options)
@@ -139,38 +139,38 @@ def flakes(options):
@task
@cmdopts([
- ("noerror", "E", "Ignore errors"),
+ ('noerror', 'E', 'Ignore errors'),
])
def pep8(options):
- noerror = getattr(options, "noerror", False)
+ noerror = getattr(options, 'noerror', False)
return sh("""find librabbitmq -name "*.py" | xargs pep8 | perl -nle'\
print; $a=1 if $_}{exit($a)'""", ignore_error=noerror)
@task
def removepyc(options):
- sh("find . -name '*.pyc' | xargs rm")
+ sh('find . -name "*.pyc" | xargs rm')
@task
-@needs("removepyc")
+@needs('removepyc')
def gitclean(options):
- sh("git clean -xdn")
+ sh('git clean -xdn')
@task
-@needs("removepyc")
+@needs('removepyc')
def gitcleanforce(options):
- sh("git clean -xdf")
+ sh('git clean -xdf')
@task
-@needs("flakes", "test", "gitclean")
+@needs('flakes', 'test', 'gitclean')
def releaseok(options):
pass
@task
-@needs("releaseok", "removepyc", "upload_docs")
+@needs('releaseok', 'removepyc', 'upload_docs')
def release(options):
pass