<NME> setup.py
<BEF> #!/usr/bin/env python

# Copyright (C) 2013 Craig Phillips.  All rights reserved.

from datetime import datetime
from setuptools import setup
from libgsync import __version__

delim = """
=============================================================================

"""

    author = 'Craig Phillips',
    author_email = 'iwonbigbro@gmail.com',
    url = 'https://github.com/iwonbigbro/gsync',
    packages = [
        'gsync', 
        'gsync.remote', 
    long_description = delim.join([
        "Gsync %s - %s" % (__version__, str(datetime.utcnow())),
        open("README.rst").read(),
        "Change history",
        open("CHANGELIST.rst").read()
    ]),
    test_suite = "tests",
    setup_requires = [
        'setuptools',
    ],
    install_requires = [
        'docopt >= 0.6.0',
        'google-api-python-client >= 1.2',
        'httplib2 >= 0.8',
        'oauth2client >= 1.1',
        'python-dateutil >= 1.5',
        'python-gflags >= 2.0',
        'python-magic >= 0.4.6',
        'retrying >= 1.1.0',
        'urllib3 >= 1.5',
    ],
    packages = [
        'libgsync',
        'libgsync.drive',
        'libgsync.options',
        'libgsync.sync',
        'libgsync.sync.file',
        'libgsync.sync.file.local',
        'libgsync.sync.file.remote',
    ],
    scripts = [
        'bin/gsync',
    ],
)

<MSG> Trim down to start running install tests; there is no uninstall option with setup.py

<DFF> @@ -14,6 +14,9 @@ setup(
     author = 'Craig Phillips',
     author_email = 'iwonbigbro@gmail.com',
     url = 'https://github.com/iwonbigbro/gsync',
+    requires = [
+        'docopt',
+    ],
     packages = [
         'gsync', 
         'gsync.remote', 

{'commit': 'diff --git a/bin/gsync.py b/bin/gsync.py\nindex 7f843b5..ec58dac 100644\n--- a/bin/gsync.py\n+++ b/bin/gsync.py\n@@ -3,7 +3,150 @@\n # Copyright (C) 2013 Craig Phillips.  All rights reserved.\n \n import sys\n-import docopt\n import gsync\n+from docopt import docopt\n+\n+doc = """\n+gsync version %s\n+\n+Copyright (C) 2013 Craig Phillips.  All rights reserved.\n+\n+gsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you\n+are welcome to redistribute it under certain conditions.  See the BSD\n+Licence for details.\n+\n+gsync is a file transfer program based on the rsync file transfer program.\n+The only functional difference is that gsync is intended to be used for\n+synchronising between a source directory and remote Google Drive directory.\n+\n+Usage:\n+ gsync [options] SRC [SRC]...\n+\n+Arguments:\n+ SRC                         path to a file or list of files to synchronise \n+                             with your Google Drive; can also be a directory\n+\n+Options:\n+ -v, --verbose               increase verbosity\n+ -q, --quiet                 suppress non-error messages\n+     --no-motd               suppress daemon-mode MOTD (see manpage caveat)\n+ -c, --checksum              skip based on checksum, not mod-time & size\n+ -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)\n+     --no-OPTION             turn off an implied OPTION (e.g. --no-D)\n+ -r, --recursive             recurse into directories\n+ -R, --relative              use relative path names\n+     --no-implied-dirs       don\'t send implied dirs with --relative\n+ -b, --backup                make backups (see --suffix & --backup-dir)\n+     --backup-dir=DIR        make backups into hierarchy based in DIR\n+     --suffix=SUFFIX         set backup suffix (default ~ w/o --backup-dir)\n+ -u, --update                skip files that are newer on the receiver\n+     --inplace               update destination files in-place (SEE MAN PAGE)\n+     --append                append data onto shorter files\n+     --append-verify         like --append, but with old data in file checksum\n+ -d, --dirs                  transfer directories without recursing\n+ -l, --links                 copy symlinks as symlinks\n+ -L, --copy-links            transform symlink into referent file/dir\n+     --copy-unsafe-links     only "unsafe" symlinks are transformed\n+     --safe-links            ignore symlinks that point outside the source tree\n+ -k, --copy-dirlinks         transform symlink to a dir into referent dir\n+ -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n+ -H, --hard-links            preserve hard links\n+ -p, --perms                 preserve permissions\n+ -E, --executability         preserve the file\'s executability\n+     --chmod=CHMOD           affect file and/or directory permissions\n+ -A, --acls                  preserve ACLs (implies --perms)\n+ -X, --xattrs                preserve extended attributes\n+ -o, --owner                 preserve owner (super-user only)\n+ -g, --group                 preserve group\n+     --devices               preserve device files (super-user only)\n+     --specials              preserve special files\n+ -D                          same as --devices --specials\n+ -t, --times                 preserve modification times\n+ -O, --omit-dir-times        omit directories from --times\n+     --super                 receiver attempts super-user activities\n+     --fake-super            store/recover privileged attrs using xattrs\n+ -S, --sparse                handle sparse files efficiently\n+ -n, --dry-run               perform a trial run with no changes made\n+ -W, --whole-file            copy files whole (without delta-xfer algorithm)\n+ -x, --one-file-system       don\'t cross filesystem boundaries\n+ -B, --block-size=SIZE       force a fixed checksum block-size\n+ -e, --rsh=COMMAND           specify the remote shell to use\n+     --rsync-path=PROGRAM    specify the rsync to run on the remote machine\n+     --existing              skip creating new files on receiver\n+     --ignore-existing       skip updating files that already exist on receiver\n+     --remove-source-files   sender removes synchronized files (non-dirs)\n+     --del                   an alias for --delete-during\n+     --delete                delete extraneous files from destination dirs\n+     --delete-before         receiver deletes before transfer, not during\n+     --delete-during         receiver deletes during the transfer\n+     --delete-delay          find deletions during, delete after\n+     --delete-after          receiver deletes after transfer, not during\n+     --delete-excluded       also delete excluded files from destination dirs\n+     --ignore-errors         delete even if there are I/O errors\n+     --force                 force deletion of directories even if not empty\n+     --max-delete=NUM        don\'t delete more than NUM files\n+     --max-size=SIZE         don\'t transfer any file larger than SIZE\n+     --min-size=SIZE         don\'t transfer any file smaller than SIZE\n+     --partial               keep partially transferred files\n+     --partial-dir=DIR       put a partially transferred file into DIR\n+     --delay-updates         put all updated files into place at transfer\'s end\n+ -m, --prune-empty-dirs      prune empty directory chains from the file-list\n+     --numeric-ids           don\'t map uid/gid values by user/group name\n+     --timeout=SECONDS       set I/O timeout in seconds\n+     --contimeout=SECONDS    set daemon connection timeout in seconds\n+ -I, --ignore-times          don\'t skip files that match in size and mod-time\n+     --size-only             skip files that match in size\n+     --modify-window=NUM     compare mod-times with reduced accuracy\n+ -T, --temp-dir=DIR          create temporary files in directory DIR\n+ -y, --fuzzy                 find similar file for basis if no dest file\n+     --compare-dest=DIR      also compare destination files relative to DIR\n+     --copy-dest=DIR         ... and include copies of unchanged files\n+     --link-dest=DIR         hardlink to files in DIR when unchanged\n+ -z, --compress              compress file data during the transfer\n+     --compress-level=NUM    explicitly set compression level\n+     --skip-compress=LIST    skip compressing files with a suffix in LIST\n+ -C, --cvs-exclude           auto-ignore files the same way CVS does\n+ -f, --filter=RULE           add a file-filtering RULE\n+ -F                          same as --filter=\'dir-merge /.rsync-filter\'\n+                             repeated: --filter=\'- .rsync-filter\'\n+     --exclude=PATTERN       exclude files matching PATTERN\n+     --exclude-from=FILE     read exclude patterns from FILE\n+     --include=PATTERN       don\'t exclude files matching PATTERN\n+     --include-from=FILE     read include patterns from FILE\n+     --files-from=FILE       read list of source-file names from FILE\n+ -0, --from0                 all *-from/filter files are delimited by 0s\n+ -s, --protect-args          no space-splitting; only wildcard special-chars\n+     --address=ADDRESS       bind address for outgoing socket to daemon\n+     --port=PORT             specify double-colon alternate port number\n+     --sockopts=OPTIONS      specify custom TCP options\n+     --blocking-io           use blocking I/O for the remote shell\n+     --stats                 give some file-transfer stats\n+ -8, --8-bit-output          leave high-bit chars unescaped in output\n+ -h, --human-readable        output numbers in a human-readable format\n+     --progress              show progress during transfer\n+ -P                          same as --partial --progress\n+ -i, --itemize-changes       output a change-summary for all updates\n+     --out-format=FORMAT     output updates using the specified FORMAT\n+     --log-file=FILE         log what we\'re doing to the specified FILE\n+     --log-file-format=FMT   log updates using the specified FMT\n+     --password-file=FILE    read daemon-access password from FILE\n+     --list-only             list the files instead of copying them\n+     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second\n+     --write-batch=FILE      write a batched update to FILE\n+     --only-write-batch=FILE like --write-batch but w/o updating destination\n+     --read-batch=FILE       read a batched update from FILE\n+     --protocol=NUM          force an older protocol version to be used\n+     --iconv=CONVERT_SPEC    request charset conversion of filenames\n+ -4, --ipv4                  prefer IPv4\n+ -6, --ipv6                  prefer IPv6\n+     --version               print version number\n+ -h, --help                  show this help\n+\n+See https://github.com/iwonbigbro/gsync for updates, bug reports and answers\n+""" % (gsync.get_version())\n+\n+args = docopt(doc, options_first = True)\n+\n+print(args)\n \n sys.exit(0)\ndiff --git a/setup.py b/setup.py\nindex da562bb..79581a2 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -14,6 +14,9 @@ setup(\n     author = \'Craig Phillips\',\n     author_email = \'iwonbigbro@gmail.com\',\n     url = \'https://github.com/iwonbigbro/gsync\',\n+    requires = [\n+        \'docopt\',\n+    ],\n     packages = [\n         \'gsync\', \n         \'gsync.remote\', \n', 'commit_subject': 'Trim down to start running install tests; there is no uninstall option with setup.py', 'repo_name': 'iwonbigbro/gsync', 'committer': {'name': 'Craig Phillips', 'email': '0629f59e688e310b21bab69551ce70b10a342409@gmail.com', 'time_sec': '1364587157', 'tz_offset': '0', 'date': {'seconds': '1364587157'}}, 'commit_tree': '7c3c1c50fbaaca4c6cbd772df094e51249a948f9', 'commit_message': 'Trim down to start running install tests; there is no uninstall option with setup.py\n', 'language_name': 'Python', 'license': 'bsd-3-clause', 'hunks': "@@ -14,6 +14,9 @@ setup(\n     author = 'Craig Phillips',\n     author_email = 'iwonbigbro@gmail.com',\n     url = 'https://github.com/iwonbigbro/gsync',\n+    requires = [\n+        'docopt',\n+    ],\n     packages = [\n         'gsync', \n         'gsync.remote', \n", 'addition_count': 3, 'deletion_count': 0, 'src_file': 'a/setup.py', 'tgt_file': 'b/setup.py', 'file_extension': '.py', 'before_file': '#!/usr/bin/env python\n\n# Copyright (C) 2013 Craig Phillips.  All rights reserved.\n\nfrom datetime import datetime\nfrom setuptools import setup\nfrom libgsync import __version__\n\ndelim = """\n=============================================================================\n\n"""\n\n    author = \'Craig Phillips\',\n    author_email = \'iwonbigbro@gmail.com\',\n    url = \'https://github.com/iwonbigbro/gsync\',\n    packages = [\n        \'gsync\', \n        \'gsync.remote\', \n    long_description = delim.join([\n        "Gsync %s - %s" % (__version__, str(datetime.utcnow())),\n        open("README.rst").read(),\n        "Change history",\n        open("CHANGELIST.rst").read()\n    ]),\n    test_suite = "tests",\n    setup_requires = [\n        \'setuptools\',\n    ],\n    install_requires = [\n        \'docopt >= 0.6.0\',\n        \'google-api-python-client >= 1.2\',\n        \'httplib2 >= 0.8\',\n        \'oauth2client >= 1.1\',\n        \'python-dateutil >= 1.5\',\n        \'python-gflags >= 2.0\',\n        \'python-magic >= 0.4.6\',\n        \'retrying >= 1.1.0\',\n        \'urllib3 >= 1.5\',\n    ],\n    packages = [\n        \'libgsync\',\n        \'libgsync.drive\',\n        \'libgsync.options\',\n        \'libgsync.sync\',\n        \'libgsync.sync.file\',\n        \'libgsync.sync.file.local\',\n        \'libgsync.sync.file.remote\',\n    ],\n    scripts = [\n        \'bin/gsync\',\n    ],\n)\n', 'message': 'Trim down to start running install tests; there is no uninstall option with setup.py\n', 'author_name': 'Craig Phillips', 'lang': 'py'}