Created
June 7, 2013 17:13
-
-
Save douglatornell/5730819 to your computer and use it in GitHub Desktop.
Scons build file example for Sphinx HTML generation and rsync deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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