Skip to content

Instantly share code, notes, and snippets.

@douglatornell
Created June 7, 2013 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglatornell/5730819 to your computer and use it in GitHub Desktop.
Save douglatornell/5730819 to your computer and use it in GitHub Desktop.
Scons build file example for Sphinx HTML generation and rsync deployment
# -*- coding: utf-8 -*-
"""SCons build file for dwgLINQ CADD drawing metadata database tool project
for Nordion Vancouver.
"""
import os
env = Environment(
ENV=os.environ,
tools=['sphinx'],
DEPLOY_HOST='isoinfo',
DEPLOY_DIR='/var/www/htdocs/dwgLINQ/docs',
DEPLOY_SRC='docs/_build/html',
)
env.Depends('$DEPLOY_SRC/api_docs.html', Glob('dwglinq/*.py'))
env.HTML(
target='docs/_build',
source='docs',
)
env.Command(
target='$DEPLOY_HOST:$DEPLOY_DIR',
source='$DEPLOY_SRC',
action=[
'rsync -aOvz --delete $SOURCE/ $TARGET',
# Clean up empty directory tree created for target
'rm -rf $DEPLOY_HOST:',
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment