From cf16da576306aa90033642be15f84f08966c125b Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 26 Jul 2015 09:55:18 +0300 Subject: [PATCH] Add a setuptools command to rsync the documentation. --- setup.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8a8e3f476..e3ca507f6 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,22 @@ #!/usr/bin/env python3 -from setuptools import setup, find_packages +from setuptools import setup, find_packages, Command import sys import os if sys.version_info[:3] < (3, 4, 3): raise Exception("You need at least Python 3.4.3 to run ARTIQ") +class PushDocCommand(Command): + description = "uploads the documentation to m-labs.hk" + user_options = [] + def initialize_options(self): + pass + def finalize_options(self): + pass + def run(self): + os.system("rsync -avz doc/manual/_build/html/ shell.serverraum.org:~/web/m-labs.hk/artiq/manual") + requirements = [ "sphinx", "sphinx-argparse", "pyserial", "numpy", "scipy", "python-dateutil", "prettytable", "h5py", "pydaqmx", "pyelftools", @@ -52,5 +62,6 @@ setup( ext_modules=[], entry_points={ "console_scripts": scripts, - } + }, + cmdclass={"push_doc":PushDocCommand} )