Skip to content
This repository
Browse code

Update doit to version 0.14 (revision 468)

  • Loading branch information...
commit 57381d1926a8a1f4fedd455bea0735d529c2ef22 1 parent bee94ea
Josh Hansen joshhansen authored joshhansen committed

Showing 77 changed files with 5,087 additions and 1,036 deletions. Show diff stats Hide diff stats

  1. +1 1  tools/doit/.bzr/branch/last-revision
  2. +1 1  tools/doit/.bzr/branch/tags
  3. BIN  tools/doit/.bzr/checkout/dirstate
  4. +177 0 tools/doit/.bzr/checkout/merge-hashes
  5. BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.cix
  6. BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.iix
  7. BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.rix
  8. +5 0 tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.six
  9. BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.tix
  10. BIN  tools/doit/.bzr/repository/pack-names
  11. BIN  tools/doit/.bzr/repository/packs/d8830c94e7c0d77fb82bca316c54ab39.pack
  12. +3 0  tools/doit/.bzrignore
  13. +48 0 tools/doit/CHANGES
  14. +1 1  tools/doit/LICENSE
  15. +19 10 tools/doit/README
  16. +13 13 tools/doit/TODO.txt
  17. +76 0 tools/doit/bash_completion_doit
  18. +0 28 tools/doit/contrib/check_pre_commit.py
  19. +485 0 tools/doit/distribute_setup.py
  20. +2 1  tools/doit/doc/_templates/homesidebar.html
  21. +0 1  tools/doit/doc/_templates/layout.html
  22. +23 2 tools/doit/doc/cmd_other.rst
  23. +11 0 tools/doit/doc/cmd_run.rst
  24. +2 2 tools/doit/doc/conf.py
  25. +105 31 tools/doit/doc/dependencies.rst
  26. +0 87 tools/doit/doc/developer.rst
  27. 0  tools/doit/{ → doc}/epydoc.config
  28. +28 9 tools/doit/doc/index.rst
  29. +2 2 tools/doit/doc/install.rst
  30. +31 4 tools/doit/doc/tasks.rst
  31. +68 6 tools/doit/doc/tools.rst
  32. +16 0 tools/doit/doc/tutorial/check_timestamp_unchanged.py
  33. +8 0 tools/doit/doc/tutorial/config_params.py
  34. +3 1 tools/doit/doc/tutorial/download.py
  35. +8 0 tools/doit/doc/tutorial/get_var.py
  36. +14 3 tools/doit/doc/tutorial/getargs.py
  37. +3 4 tools/doit/doc/tutorial/hello.py
  38. +5 0 tools/doit/doc/tutorial/interactiveaction.py
  39. +35 0 tools/doit/doc/tutorial/my_dodo.py
  40. +31 0 tools/doit/doc/tutorial/my_tasks.py
  41. +6 0 tools/doit/doc/tutorial/run_once.py
  42. +9 0 tools/doit/doc/tutorial/taskorder.py
  43. +9 0 tools/doit/doc/tutorial/timeout.py
  44. +0 1  tools/doit/doc/tutorial/tutorial_01.py
  45. +14 0 tools/doit/doc/tutorial/uptodate_callable.py
  46. +103 17 tools/doit/dodo.py
  47. +25 1 tools/doit/doit/__init__.py
  48. +54 37 tools/doit/doit/action.py
  49. +54 31 tools/doit/doit/cmds.py
  50. +3 2 tools/doit/doit/control.py
  51. +91 65 tools/doit/doit/dependency.py
  52. +55 42 tools/doit/doit/doit_cmd.py
  53. +32 9 tools/doit/doit/loader.py
  54. +25 21 tools/doit/doit/reporter.py
  55. +26 22 tools/doit/doit/runner.py
  56. +193 89 tools/doit/doit/task.py
  57. +157 1 tools/doit/doit/tools.py
  58. +0 13 tools/doit/manage.txt
  59. +0 8 tools/doit/precommit
  60. +4 3 tools/doit/pylintrc
  61. +0 15 tools/doit/release.py
  62. +2,095 0 tools/doit/runtests.py
  63. +46 40 tools/doit/setup.py
  64. +65 0 tools/doit/tests/conftest.py
  65. +68 14 tools/doit/tests/test_action.py
  66. +5 5 tools/doit/tests/test_cmdparse.py
  67. +178 122 tools/doit/tests/test_cmds.py
  68. +21 15 tools/doit/tests/test_control.py
  69. +78 51 tools/doit/tests/test_dependency.py
  70. +23 5 tools/doit/tests/test_doit_cmd.py
  71. +3 18 tools/doit/tests/test_filewatch.py
  72. +38 24 tools/doit/tests/test_loader.py
  73. +8 1 tools/doit/tests/test_reporter.py
  74. +119 96 tools/doit/tests/test_runner.py
  75. +68 39 tools/doit/tests/test_task.py
  76. +188 1 tools/doit/tests/test_tools.py
  77. +0 21 tools/doit/website.py
2  tools/doit/.bzr/branch/last-revision
... ... @@ -1 +1 @@
1   -345 schettino72-20110124215655-kebbgduu0q0rdx8n
  1 +468 schettino72-20111105152507-m1a53om4dhuqutag
2  tools/doit/.bzr/branch/tags
... ... @@ -1 +1 @@
1   -d6:0.10.043:schettino72-20110124214734-j9flir4uyjr260t35:0.2.053:schettino72@gmail.com-20090416160500-bw38ia2elbqons293:0.353:schettino72@gmail.com-20090830071548-jiglcfa09wfrqdln5:0.4.053:schettino72@gmail.com-20091005083222-u4s5vngkx4oqk3j03:0.554:eduardo@eduardo-laptop-20091130141038-mvxhkcja4rf8pqu25:0.5.154:eduardo@eduardo-laptop-20091203153440-zbsnmkwcplaqejrd5:0.6.054:eduardo@eduardo-laptop-20100125221455-yk7hioxbnscqbwl55:0.7.054:eduardo@eduardo-laptop-20100408142307-0qn02mu4quga1mqm5:0.8.054:eduardo@eduardo-laptop-20100516154620-mgvhn18s7fo3wehn5:0.9.054:eduardo@eduardo-laptop-20100607181503-g4rmwzjvvmi9dx4we
  1 +d6:0.10.043:schettino72-20110124214734-j9flir4uyjr260t36:0.11.043:schettino72-20110419165925-n04296tkivyyy3fl6:0.13.043:schettino72-20110718125215-qjpi8uovhsa5v4mv6:0.14.043:schettino72-20111105063733-t01zl2qt1f5b31hv5:0.2.053:schettino72@gmail.com-20090416160500-bw38ia2elbqons293:0.353:schettino72@gmail.com-20090830071548-jiglcfa09wfrqdln5:0.4.053:schettino72@gmail.com-20091005083222-u4s5vngkx4oqk3j03:0.554:eduardo@eduardo-laptop-20091130141038-mvxhkcja4rf8pqu25:0.5.154:eduardo@eduardo-laptop-20091203153440-zbsnmkwcplaqejrd5:0.6.054:eduardo@eduardo-laptop-20100125221455-yk7hioxbnscqbwl55:0.7.054:eduardo@eduardo-laptop-20100408142307-0qn02mu4quga1mqm5:0.8.054:eduardo@eduardo-laptop-20100516154620-mgvhn18s7fo3wehn5:0.9.054:eduardo@eduardo-laptop-20100607181503-g4rmwzjvvmi9dx4we
BIN  tools/doit/.bzr/checkout/dirstate
Binary file not shown
177 tools/doit/.bzr/checkout/merge-hashes
... ... @@ -0,0 +1,177 @@
  1 +BZR merge-modified list format 1
  2 +file_id: __init__.py-20080224192138-af5npe4e56lv9564-16
  3 +hash: 60bed77fc3af90ab5a171068d49dd516f3d18f2c
  4 +
  5 +file_id: test_doit.py-20080224192138-af5npe4e56lv9564-27
  6 +hash: 863bfbfd25eebb2845b046da881bf7cac35357ff
  7 +
  8 +file_id: test_filewatch.py-20101219034331-h39y9byqvs9bsxgl-1
  9 +hash: 5a7edb3601f4cfa53c445de8edfb70b130080a52
  10 +
  11 +file_id: main.py-20080224192138-af5npe4e56lv9564-19
  12 +hash: c7279b3cb59400c7b386f8ab73a3abd3f6f8ccaf
  13 +
  14 +file_id: test_dependency.py-20080224192138-af5npe4e56lv9564-26
  15 +hash: 65aaa126f1f3013e905b3a7f5e86cf1e5ab0dd47
  16 +
  17 +file_id: my_tasks.py-20110522031513-cnnc2eeygx7zjcy8-2
  18 +hash: d6e0ca9663a95ebf2f21c033ef82ba065a6c4cd2
  19 +
  20 +file_id: test_doit_cmd.py-20100403161443-zukwnxq4tmzlpqtj-1
  21 +hash: fd1055d7b6d68c8079b788f5da4b6386ca31ebd1
  22 +
  23 +file_id: interactiveaction.py-20111101173044-jq9sfmo6fo3pd3sc-1
  24 +hash: 7638d194c4f92fd8f3239c5dbe314dfc49a54a17
  25 +
  26 +file_id: get_var.py-20110717095042-w3t9nwx99x1yc32g-1
  27 +hash: 10dcb5429bd8687b97f58f815746d15f4ae1bef4
  28 +
  29 +file_id: test_cmdparse.py-20090607043556-aeo4fchkihr2lwo4-1
  30 +hash: a80c8da4dc12235a0001d0850a96d92f5fb3a08a
  31 +
  32 +file_id: dependency.py-20080224192138-af5npe4e56lv9564-18
  33 +hash: 6d2b25f656b2bbb27170590ff09125a2ff3aac51
  34 +
  35 +file_id: hello.py-20091005055923-fvx2rssz4sopej3c-6
  36 +hash: 3525c1196c5997c0ef1a38c43d88446d16b59d89
  37 +
  38 +file_id: setup.py-20080328184022-afk20lfi28g1zdx7-1
  39 +hash: a18b7c7704e633390ff971a2f2de21b2ad23df30
  40 +
  41 +file_id: tools.rst-20091005073127-gp2n8hnhxpxqc3qq-1
  42 +hash: 6fa497041c9f11adbb5791e15a3ddd2487ed7f2b
  43 +
  44 +file_id: conf.py-20090411151330-pczd0p8utstercbo-2
  45 +hash: a37ac4d9eb36ed04d25ed3186cb324816647ecc6
  46 +
  47 +file_id: install.rst-20091005060421-34w0yo1794f03tnk-5
  48 +hash: d3e75dc49df50355fad5512505d04b53bd76c501
  49 +
  50 +file_id: test_cmds.py-20091008083207-fcsnbgdkg3sqqg4a-1
  51 +hash: c83652e4a7add2b56121504bea154ceb4971aa39
  52 +
  53 +file_id: loader.py-20101017142547-w30pau9xgpmp00ts-1
  54 +hash: 0cecf3f6f2d495cd0f6d8f0cd2f7ef7e450e7ad3
  55 +
  56 +file_id: taskorder.py-20110522031559-11ilv4x8pycrrst4-1
  57 +hash: 4755c6f9dcb481d6675227d55153cc8990a72953
  58 +
  59 +file_id: test_action.py-20100424164726-wtxrq6ly98f60ibo-1
  60 +hash: e46dacbd81e8f5c49358458ff287c9b15149737d
  61 +
  62 +file_id: test_tools.py-20090926143215-ak6qc7ernpvib3ma-1
  63 +hash: 1e2fea3185c2cd8dfb0706330a9f82d8a90be9dc
  64 +
  65 +file_id: tools.py-20090926143215-ak6qc7ernpvib3ma-2
  66 +hash: 2212f1a0823b1b411623051b94385040a649e19b
  67 +
  68 +file_id: homesidebar.html-20090412104217-l17b7slha8wmion4-2
  69 +hash: 79e7d056dbb1b65297369682fa2829b143a01fc7
  70 +
  71 +file_id: tasks.rst-20091005060421-34w0yo1794f03tnk-7
  72 +hash: 87ed206c030c18522142d3827fde0f41ed8a8b72
  73 +
  74 +file_id: test_task.py-20080309072342-5ickg1z25pw34fi3-1
  75 +hash: 451e728c5c84942236ffdaaa2f2af660209fa6f0
  76 +
  77 +file_id: timeout.py-20110525160253-2rj9qdd8w7e5yu13-1
  78 +hash: 073443999c567de3de5e62f78cf128c3c6a92ef9
  79 +
  80 +file_id: uptodate_callable.py-20110523170330-6g7wc7qdkmfddpjy-1
  81 +hash: 854156ff38884d0580c95afcab7f3f3baa75a079
  82 +
  83 +file_id: layout.html-20090411151232-qex10sp6p55w9muw-6
  84 +hash: 941030cf105e4dc2e59d2a1b6c83198aeced5566
  85 +
  86 +file_id: readme-20080328184016-1v7dzi45o1z91fzs-1
  87 +hash: d1d35763a1eeccd1663db83e3f96397bcd24ab0e
  88 +
  89 +file_id: reporter.py-20091008043441-m3qzczui5vs1lt4t-1
  90 +hash: 7a4fac1ac8e4b869d988625a14caac098e6bdd1d
  91 +
  92 +file_id: download.py-20090414161036-20s2q9bzqn9gfcjm-1
  93 +hash: 787e172932a8f5aec2134cb106332102ffd117b1
  94 +
  95 +file_id: config_params.py-20110717100935-c02n1qzrcex39nu9-1
  96 +hash: 4a32c0dd02bf5122778630a6c6487a0d7c30c9be
  97 +
  98 +file_id: dodo.py-20080224192138-af5npe4e56lv9564-5
  99 +hash: 90c53ee64a9c91373acb780f0122f2ffdda7e4e0
  100 +
  101 +file_id: test_main.py-20080302115357-65rj01jgd24nivr2-1
  102 +hash: c405a887ed42f36d67d2f7a3750fc07a7edded90
  103 +
  104 +file_id: task.py-20080309072328-ckjvvsqo5na52tdp-1
  105 +hash: 10b8e5c11f2e9987e4ea79b9f6bbafe0baceeb92
  106 +
  107 +file_id: test_loader.py-20101017142935-fgrpzj01raquiuyp-1
  108 +hash: 5b98e7d3281672293764d7b4c98f78eb4dfe03bc
  109 +
  110 +file_id: cmd_run.rst-20091127065406-20je7i8iul30v45c-1
  111 +hash: d089ec0dfa5fef8e852d659480c382069c1524bb
  112 +
  113 +file_id: cmds.py-20091008083142-1ftu0mi5n1k4e66n-1
  114 +hash: 4571913040462d56c9714daca113343ca24f1eb9
  115 +
  116 +file_id: core.py-20080224192138-af5npe4e56lv9564-17
  117 +hash: 6cd7393e699ed792ecbeed4f4b6e53c5dbebbeb2
  118 +
  119 +file_id: index.txt-20080402192713-3wws8r6xchdpis0n-1
  120 +hash: ebb75b4652724117aae5f6acdfa1f44e92f53338
  121 +
  122 +file_id: check_timestamp_unch-20111002133512-2cv7vyeeddk91dkr-1
  123 +hash: 1bef51c7e1cc9931aff6f55dee2f8cdcd01c9c6c
  124 +
  125 +file_id: license-20080328184011-frghb67prg0ataey-1
  126 +hash: 4fa78fc09e0c8fe608045de99c151fafdf2ff1dd
  127 +
  128 +file_id: bashcomplete-20111023104512-uc21hmk3nk4xdmkp-1
  129 +hash: 6872d9ad095dd442274a791ac4e10d1d22251b43
  130 +
  131 +file_id: run_once.py-20110523170319-djp8nnaykbwxi0in-1
  132 +hash: 771e89a9c3436a1b31f9a181ebeb6e99fc070cb2
  133 +
  134 +file_id: action.py-20100424164712-13jqefq8okscq5th-1
  135 +hash: 2a7c4856342f96ca9926f17c3b92b9f5c7c180ad
  136 +
  137 +file_id: conftest.py-20110409130847-01v521ojtxp4qh25-1
  138 +hash: 7b5799530f76b88f55b8166225fa2280f055b135
  139 +
  140 +file_id: test_reporter.py-20091008083207-fcsnbgdkg3sqqg4a-2
  141 +hash: 3a4680df2a61bfbf3f0bf9fe833545a4db1e6ee0
  142 +
  143 +file_id: getargs.py-20100125213940-79bjomuuyvpvo46b-1
  144 +hash: 1a44d7dc04449720a7b7997c422e8230ba2e5b76
  145 +
  146 +file_id: doit_cmd.py-20100228053123-gi7qzn40rhtz9nyo-1
  147 +hash: 3c0980241c1bd9eb27918f8d939572e32ed20ad0
  148 +
  149 +file_id: runtests.py-20110410030538-airao4z1ychql4e5-1
  150 +hash: 178ec0387f94e198fae7cfa1221a021ed5437b34
  151 +
  152 +file_id: bzrignore-20080224192224-6ac1r76kxufffbgd-1
  153 +hash: 25cabd4468396e34707f5cf86805053d21ec3065
  154 +
  155 +file_id: dependencies.rst-20091005060421-34w0yo1794f03tnk-3
  156 +hash: 9e599e3af730beadf90cbe87ffb0b7a93db6b900
  157 +
  158 +file_id: cmd_line.rst-20091005060421-34w0yo1794f03tnk-2
  159 +hash: 411aa148637df09ddd5c061f70bbe438e890452c
  160 +
  161 +file_id: todo.txt-20080224192138-af5npe4e56lv9564-1
  162 +hash: 8607a62a5bdf25e2bde10dde5f94ffb5d1b2295d
  163 +
  164 +file_id: changes-20090504150229-cp5xgn9fhfmrzfwy-1
  165 +hash: 4ef5e24b27f4fc0678fee4090cf2e38a1d020fec
  166 +
  167 +file_id: tutorial_01.py-20080402172255-301rwetee0qms0fn-19
  168 +hash: 78c6c795efc1f667f65a225d299ade7b25fc0e0e
  169 +
  170 +file_id: my_dodo.py-20110522031513-cnnc2eeygx7zjcy8-1
  171 +hash: 6b6c981bcedee2edf96466bbc600f666e6731fcd
  172 +
  173 +file_id: distribute_setup.py-20110410033705-gmp74xa1ntfuqqmo-1
  174 +hash: bbd329f1f9a2cf37a0f00442d4e9a6da7f77cd1d
  175 +
  176 +file_id: pylintrc-20101006154325-spmm5rezddyjz1td-1
  177 +hash: c9cc1e2e2737dd166bd996784c0ef88c94c545bb
BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.cix
Binary file not shown
BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.iix
Binary file not shown
BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.rix
Binary file not shown
5 tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.six
... ... @@ -0,0 +1,5 @@
  1 +B+Tree Graph Index 2
  2 +node_ref_lists=0
  3 +key_elements=1
  4 +len=0
  5 +row_lengths=
BIN  tools/doit/.bzr/repository/indices/d8830c94e7c0d77fb82bca316c54ab39.tix
Binary file not shown
BIN  tools/doit/.bzr/repository/pack-names
Binary file not shown
BIN  tools/doit/.bzr/repository/packs/d8830c94e7c0d77fb82bca316c54ab39.pack
Binary file not shown
3  tools/doit/.bzrignore
... ... @@ -1,6 +1,9 @@
1 1 .coverage*
2 2 .doit.db
3 3
  4 +.pytest-incremental*
  5 +pytest.ini
  6 +
4 7 tests/data/*
5 8
6 9 dist
48 tools/doit/CHANGES
@@ -3,6 +3,54 @@
3 3 Changes
4 4 =======
5 5
  6 +
  7 +0.14.0 (*2011-11-05*)
  8 +========================
  9 +
  10 +- added tools.InteractiveAction (#865290)
  11 +- bash completion script
  12 +- sub-command list: tasks on aphabetical order, better formatting (#872829)
  13 +- fix ``uptodate`` to accept instance methods callables (#871967)
  14 +- added command line option ``--seek-file``
  15 +- added ``tools.check_unchanged_timestamp`` (#862606)
  16 +- fix bug subclasses of BaseAction should get a task reference
  17 +
  18 +
  19 +0.13.0 (*2011-07-18*)
  20 +========================
  21 +
  22 +- performance speed improvements
  23 +- fix bug on unicode output when task fails
  24 +- ConsoleReporter does not output task's title for successful tasks that start with an ``_``
  25 +- added ``tools.config_changed`` (to be used wirh ``uptodate``)
  26 +- ``teardown`` actions are executed in reverse order they were registered
  27 +- added ``doit.get_var`` to get variables passed from command line
  28 +- getargs creates implicit "setup" task not a "task_dep"
  29 +
  30 +
  31 +0.12.0 (*2011-05-29*)
  32 +=======================
  33 +
  34 +- fix bug #770150 - error on task dependency from target
  35 +- fix bug #773579 - unicode output problems
  36 +- task parameter ``uptodate`` accepts callables
  37 +- deprecate task attribute run_once. use tools.run_once on uptodate instead
  38 +- added doit.tools.timeout
  39 +
  40 +
  41 +0.11.0 (*2011-04-20*)
  42 +========================
  43 +
  44 +- no more support for python2.4
  45 +- support for python 3.2
  46 +- fix bug on unicode filenames & unicode output (#737904)
  47 +- fix bug when using getargs together with multiprocess (#742953)
  48 +- fix for dumbdmb backend
  49 +- fix task execution order when using "auto" command
  50 +- fix getargs when used with sub-tasks
  51 +- fix calc_dep when used with "auto" command
  52 +- "auto" command now support verbosity control option
  53 +
6 54 0.10.0 (*2011-01-24*)
7 55 ======================
8 56
2  tools/doit/LICENSE
@@ -2,7 +2,7 @@
2 2
3 3 The MIT License
4 4
5   -Copyright (c) 2008-2010 Eduardo Naufel Schettino
  5 +Copyright (c) 2008-2011 Eduardo Naufel Schettino
6 6
7 7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 8 of this software and associated documentation files (the "Software"), to deal
29 tools/doit/README
@@ -17,6 +17,9 @@ Developers / contributors
17 17 * Philipp Tölke - https://launchpad.net/~toelke+lp
18 18 * Daniel Hjelm - doit-d at hjelm dot eu
19 19 * Damiro - https://launchpad.net/~damiro
  20 + * Charlie Guo - https://launchpad.net/~charlie.guo
  21 + * Michael Gliwinski - https://launchpad.net/~tzeentch-gm
  22 +
20 23
21 24 Project Details
22 25 ===============
@@ -29,7 +32,7 @@ Project Details
29 32 INSTALL
30 33 =======
31 34
32   -doit is tested on python 2.4, 2.5, 2.6.
  35 +doit is tested on python 2.5, 2.6, 2.7, 3.2.
33 36
34 37 ``python setup.py install``
35 38
@@ -37,28 +40,34 @@ doit is tested on python 2.4, 2.5, 2.6.
37 40 DEPENDENCIES
38 41 ============
39 42
40   -- simplejson [python 2.4 & 2.5]
41   -- multiprocessing [python 2.4 & 2.5]
42   -- pyinotify (linux) [all python versions] (requires ctypes - not in python2.4 stdlib)
  43 +- simplejson [python 2.5]
  44 +- multiprocessing [python 2.5]
  45 +- pyinotify (linux) [all python versions]
43 46 - macfsevents (mac)
44 47
45 48 Tools required for development:
46 49
  50 +- bazaar * VCS
47 51 - py.test * unit-tests
48 52 - mock * unit-tests
49   -- bazaar * VCS
  53 +- coverage * code coverage
50 54 - epydoc * API doc generator
51 55 - sphinx * doc tool
52 56 - pyflakes * syntax checker
53   -- pychecker * syntax checker
  57 +
54 58
55 59
56 60 TESTS
57 61 =====
58 62
59   -`py.test <http://codespeak.net/py/dist/test/index.html>`_ is required to run the test suite.
  63 +You can use a standalone script::
  64 +
  65 + python runtests.py
  66 +
  67 +or use `py.test <http://codespeak.net/py/dist/test/index.html>`_ ::
  68 +
  69 + py.test
60 70
61   -``py.test``
62 71
63 72 DOCUMENTATION
64 73 =============
@@ -66,7 +75,7 @@ DOCUMENTATION
66 75 ``doc`` folder contains ReST documentation. They are the base for creating the website.
67 76 To create it (after installing doit):
68 77
69   -``doit -f website.py``
  78 +``doit website``
70 79
71 80 It includes epydoc generated API documentation.
72 81
@@ -75,6 +84,6 @@ LICENSE
75 84 =======
76 85
77 86 The MIT License
78   -Copyright (c) 2008-2010 Eduardo Naufel Schettino
  87 +Copyright (c) 2008-2011 Eduardo Naufel Schettino
79 88
80 89 see LICENSE file
26 tools/doit/TODO.txt
... ... @@ -1,40 +1,40 @@
1   -big refactorings
2   -------------------
3   -
4   -Task into TaskDep + Task
5   -TaskControl into Create + Process
6   -
7 1 0.X
8 2 ----------
9 3
10 4 . more MP (tree)
11 5 . setup/task single process/all procces
12   -. --enable/--disable cmd line options
  6 +. --enable/--disable cmd line options (#586651)
  7 +. better terminal output
13 8
14   -. dynamic task
15   -. GLOBAL vars from cmd line
  9 +wishlist
  10 +----------
16 11
17 12 . tools - profile
18 13 . tools - code coverage
19 14
20 15 . color output on the terminal. (#263576)
21   -. tab-complete
22   -
23 16 . option dont save successful results
24 17 . forget a dependency, not a task
25 18 . option to make sub-task not part of a group
26 19 . task name alias
27   -. cache dir files (speed optimization)
  20 +
28 21
29 22 needs volunteer
30 23 ----------------
31 24
32 25 . windows (#218276)
33 26
  27 +
  28 +big refactorings
  29 +------------------
  30 +
  31 +. Task into TaskDep + Task
  32 +. TaskControl into Create + Process
  33 +
  34 +
34 35 not clear how to implement
35 36 ---------------------------
36 37
37   -. dont get subtasks if task is not going to be executed (#370923)
38 38 . one .doit for each dodo file
39 39 . multiple (include) dodo files (#218279)
40 40 . sub-command/task unification. all sub-commands (but run) implemented as tasks
76 tools/doit/bash_completion_doit
... ... @@ -0,0 +1,76 @@
  1 +# bash completion for doit
  2 +# reference => http://www.debian-administration.org/articles/317
  3 +
  4 +_doit()
  5 +{
  6 + local cur prev basetask sub_cmds tasks i dodof
  7 + COMPREPLY=()
  8 + COMP_WORDBREAKS=${COMP_WORDBREAKS//:} # remove colon from word separator list
  9 + cur="${COMP_WORDS[COMP_CWORD]}"
  10 + prev="${COMP_WORDS[COMP_CWORD-1]}"
  11 + # list of doit sub-commands
  12 + sub_cmds="help run clean list forget ignore auto"
  13 +
  14 +
  15 + # options that take file/dir as values should complete file-system
  16 + if [[ "$prev" == "-f" || "$prev" == "-d" || "$prev" == "-o" ]]; then
  17 + _filedir
  18 + return 0
  19 + fi
  20 + if [[ "$cur" == *=* ]]; then
  21 + prev=${cur/=*/}
  22 + cur=${cur/*=/}
  23 + if [[ "$prev" == "--file=" || "$prev" == "--dir=" || "$prev" == "--output-file=" ]]; then
  24 + _filedir -o nospace
  25 + return 0
  26 + fi
  27 + fi
  28 +
  29 +
  30 + # get name of the dodo file
  31 + for (( i=0; i < ${#COMP_WORDS[@]}; i++)); do
  32 + case "${COMP_WORDS[i]}" in
  33 + -f)
  34 + dodof=${COMP_WORDS[i+1]}
  35 + break
  36 + ;;
  37 + --file=*)
  38 + dodof=${COMP_WORDS[i]/*=/}
  39 + break
  40 + ;;
  41 + esac
  42 + done
  43 + # dodo file not specified, use default
  44 + if [ ! $dodof ]
  45 + then
  46 + dodof="dodo.py"
  47 + fi
  48 +
  49 +
  50 + # get task list
  51 + # if it there is colon it is getting a subtask...
  52 + if [[ "$cur" == *:* ]]; then
  53 + # extract base task name (remove everything after colon)
  54 + basetask=${cur%:*}
  55 + # sub-tasks
  56 + tasks=$(doit list --file="$dodof" --quiet --all ${basetask})
  57 + COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) )
  58 + return 0
  59 + # without colons get only top tasks
  60 + else
  61 + tasks=$(doit list --file="$dodof" --quiet)
  62 + fi
  63 +
  64 +
  65 + # match for first parameter must be sub-command or task
  66 + # FIXME doit accepts options "-" in the first parameter but we ignore this case
  67 + if [[ ${COMP_CWORD} == 1 ]] ; then
  68 + COMPREPLY=( $(compgen -W "${sub_cmds} ${tasks}" -- ${cur}) )
  69 + return 0
  70 + fi
  71 +
  72 + # if there is already one parameter match only tasks (no commands)
  73 + COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) )
  74 +
  75 +}
  76 +complete -F _doit doit
28 tools/doit/contrib/check_pre_commit.py
... ... @@ -1,28 +0,0 @@
1   -"""this is a plugin/hook for bazaar. just add this file to ~/.bazaar/plugins/
2   -
3   -The MIT License
4   -Copyright (c) 2008 Eduardo Naufel Schettino
5   -see LICENSE
6   -"""
7   -
8   -from bzrlib import branch
9   -
10   -def pre_commit_hook(local, master, old_revno, old_revid, future_revno, future_revid, tree_delta, future_tree):
11   - """This hook will execute precommit script from root path of the bazaar
12   - branch. Commit will be canceled if precommit fails."""
13   -
14   - import os,subprocess
15   - from bzrlib import errors
16   -
17   - # this hook only makes sense if a precommit file exist.
18   - if not os.path.exists("precommit"):
19   - return
20   - try:
21   - subprocess.check_call(os.path.abspath("precommit"))
22   - # if precommit fails (process return not zero) cancel commit.
23   - except subprocess.CalledProcessError:
24   - raise errors.BzrError("pre commit check failed.")
25   -
26   -
27   -branch.Branch.hooks.install_hook('pre_commit', pre_commit_hook)
28   -branch.Branch.hooks.name_hook(pre_commit_hook, 'Check pre_commit hook')
485 tools/doit/distribute_setup.py
... ... @@ -0,0 +1,485 @@
  1 +#!python
  2 +"""Bootstrap distribute installation
  3 +
  4 +If you want to use setuptools in your package's setup.py, just include this
  5 +file in the same directory with it, and add this to the top of your setup.py::
  6 +
  7 + from distribute_setup import use_setuptools
  8 + use_setuptools()
  9 +
  10 +If you want to require a specific version of setuptools, set a download
  11 +mirror, or use an alternate download directory, you can do so by supplying
  12 +the appropriate options to ``use_setuptools()``.
  13 +
  14 +This file can also be run as a script to install or upgrade setuptools.
  15 +"""
  16 +import os
  17 +import sys
  18 +import time
  19 +import fnmatch
  20 +import tempfile
  21 +import tarfile
  22 +from distutils import log
  23 +
  24 +try:
  25 + from site import USER_SITE
  26 +except ImportError:
  27 + USER_SITE = None
  28 +
  29 +try:
  30 + import subprocess
  31 +
  32 + def _python_cmd(*args):
  33 + args = (sys.executable,) + args
  34 + return subprocess.call(args) == 0
  35 +
  36 +except ImportError:
  37 + # will be used for python 2.3
  38 + def _python_cmd(*args):
  39 + args = (sys.executable,) + args
  40 + # quoting arguments if windows
  41 + if sys.platform == 'win32':
  42 + def quote(arg):
  43 + if ' ' in arg:
  44 + return '"%s"' % arg
  45 + return arg
  46 + args = [quote(arg) for arg in args]
  47 + return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
  48 +
  49 +DEFAULT_VERSION = "0.6.15"
  50 +DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
  51 +SETUPTOOLS_FAKED_VERSION = "0.6c11"
  52 +
  53 +SETUPTOOLS_PKG_INFO = """\
  54 +Metadata-Version: 1.0
  55 +Name: setuptools
  56 +Version: %s
  57 +Summary: xxxx
  58 +Home-page: xxx
  59 +Author: xxx
  60 +Author-email: xxx
  61 +License: xxx
  62 +Description: xxx
  63 +""" % SETUPTOOLS_FAKED_VERSION
  64 +
  65 +
  66 +def _install(tarball):
  67 + # extracting the tarball
  68 + tmpdir = tempfile.mkdtemp()
  69 + log.warn('Extracting in %s', tmpdir)
  70 + old_wd = os.getcwd()
  71 + try:
  72 + os.chdir(tmpdir)
  73 + tar = tarfile.open(tarball)
  74 + _extractall(tar)
  75 + tar.close()
  76 +
  77 + # going in the directory
  78 + subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
  79 + os.chdir(subdir)
  80 + log.warn('Now working in %s', subdir)
  81 +
  82 + # installing
  83 + log.warn('Installing Distribute')
  84 + if not _python_cmd('setup.py', 'install'):
  85 + log.warn('Something went wrong during the installation.')
  86 + log.warn('See the error message above.')
  87 + finally:
  88 + os.chdir(old_wd)
  89 +
  90 +
  91 +def _build_egg(egg, tarball, to_dir):
  92 + # extracting the tarball
  93 + tmpdir = tempfile.mkdtemp()
  94 + log.warn('Extracting in %s', tmpdir)
  95 + old_wd = os.getcwd()
  96 + try:
  97 + os.chdir(tmpdir)
  98 + tar = tarfile.open(tarball)
  99 + _extractall(tar)
  100 + tar.close()
  101 +
  102 + # going in the directory
  103 + subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
  104 + os.chdir(subdir)
  105 + log.warn('Now working in %s', subdir)
  106 +
  107 + # building an egg
  108 + log.warn('Building a Distribute egg in %s', to_dir)
  109 + _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
  110 +
  111 + finally:
  112 + os.chdir(old_wd)
  113 + # returning the result
  114 + log.warn(egg)
  115 + if not os.path.exists(egg):
  116 + raise IOError('Could not build the egg.')
  117 +
  118 +
  119 +def _do_download(version, download_base, to_dir, download_delay):
  120 + egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
  121 + % (version, sys.version_info[0], sys.version_info[1]))
  122 + if not os.path.exists(egg):
  123 + tarball = download_setuptools(version, download_base,
  124 + to_dir, download_delay)
  125 + _build_egg(egg, tarball, to_dir)
  126 + sys.path.insert(0, egg)
  127 + import setuptools
  128 + setuptools.bootstrap_install_from = egg
  129 +
  130 +
  131 +def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
  132 + to_dir=os.curdir, download_delay=15, no_fake=True):
  133 + # making sure we use the absolute path
  134 + to_dir = os.path.abspath(to_dir)
  135 + was_imported = 'pkg_resources' in sys.modules or \
  136 + 'setuptools' in sys.modules
  137 + try:
  138 + try:
  139 + import pkg_resources
  140 + if not hasattr(pkg_resources, '_distribute'):
  141 + if not no_fake:
  142 + _fake_setuptools()
  143 + raise ImportError
  144 + except ImportError:
  145 + return _do_download(version, download_base, to_dir, download_delay)
  146 + try:
  147 + pkg_resources.require("distribute>="+version)
  148 + return
  149 + except pkg_resources.VersionConflict:
  150 + e = sys.exc_info()[1]
  151 + if was_imported:
  152 + sys.stderr.write(
  153 + "The required version of distribute (>=%s) is not available,\n"
  154 + "and can't be installed while this script is running. Please\n"
  155 + "install a more recent version first, using\n"
  156 + "'easy_install -U distribute'."
  157 + "\n\n(Currently using %r)\n" % (version, e.args[0]))
  158 + sys.exit(2)
  159 + else:
  160 + del pkg_resources, sys.modules['pkg_resources'] # reload ok
  161 + return _do_download(version, download_base, to_dir,
  162 + download_delay)
  163 + except pkg_resources.DistributionNotFound:
  164 + return _do_download(version, download_base, to_dir,
  165 + download_delay)
  166 + finally:
  167 + if not no_fake:
  168 + _create_fake_setuptools_pkg_info(to_dir)
  169 +
  170 +def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
  171 + to_dir=os.curdir, delay=15):
  172 + """Download distribute from a specified location and return its filename
  173 +
  174 + `version` should be a valid distribute version number that is available
  175 + as an egg for download under the `download_base` URL (which should end
  176 + with a '/'). `to_dir` is the directory where the egg will be downloaded.
  177 + `delay` is the number of seconds to pause before an actual download
  178 + attempt.
  179 + """
  180 + # making sure we use the absolute path
  181 + to_dir = os.path.abspath(to_dir)
  182 + try:
  183 + from urllib.request import urlopen
  184 + except ImportError:
  185 + from urllib2 import urlopen
  186 + tgz_name = "distribute-%s.tar.gz" % version
  187 + url = download_base + tgz_name
  188 + saveto = os.path.join(to_dir, tgz_name)
  189 + src = dst = None
  190 + if not os.path.exists(saveto): # Avoid repeated downloads
  191 + try:
  192 + log.warn("Downloading %s", url)
  193 + src = urlopen(url)
  194 + # Read/write all in one block, so we don't create a corrupt file
  195 + # if the download is interrupted.
  196 + data = src.read()
  197 + dst = open(saveto, "wb")
  198 + dst.write(data)
  199 + finally:
  200 + if src:
  201 + src.close()
  202 + if dst:
  203 + dst.close()
  204 + return os.path.realpath(saveto)
  205 +
  206 +def _no_sandbox(function):
  207 + def __no_sandbox(*args, **kw):
  208 + try:
  209 + from setuptools.sandbox import DirectorySandbox
  210 + if not hasattr(DirectorySandbox, '_old'):
  211 + def violation(*args):
  212 + pass
  213 + DirectorySandbox._old = DirectorySandbox._violation
  214 + DirectorySandbox._violation = violation
  215 + patched = True
  216 + else:
  217 + patched = False
  218 + except ImportError:
  219 + patched = False
  220 +
  221 + try:
  222 + return function(*args, **kw)
  223 + finally:
  224 + if patched:
  225 + DirectorySandbox._violation = DirectorySandbox._old
  226 + del DirectorySandbox._old
  227 +
  228 + return __no_sandbox
  229 +
  230 +def _patch_file(path, content):
  231 + """Will backup the file then patch it"""
  232 + existing_content = open(path).read()
  233 + if existing_content == content:
  234 + # already patched
  235 + log.warn('Already patched.')
  236 + return False
  237 + log.warn('Patching...')
  238 + _rename_path(path)
  239 + f = open(path, 'w')
  240 + try:
  241 + f.write(content)
  242 + finally:
  243 + f.close()
  244 + return True
  245 +
  246 +_patch_file = _no_sandbox(_patch_file)
  247 +
  248 +def _same_content(path, content):
  249 + return open(path).read() == content
  250 +
  251 +def _rename_path(path):
  252 + new_name = path + '.OLD.%s' % time.time()
  253 + log.warn('Renaming %s into %s', path, new_name)
  254 + os.rename(path, new_name)
  255 + return new_name
  256 +
  257 +def _remove_flat_installation(placeholder):
  258 + if not os.path.isdir(placeholder):
  259 + log.warn('Unkown installation at %s', placeholder)
  260 + return False
  261 + found = False
  262 + for file in os.listdir(placeholder):
  263 + if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
  264 + found = True
  265 + break
  266 + if not found:
  267 + log.warn('Could not locate setuptools*.egg-info')
  268 + return
  269 +
  270 + log.warn('Removing elements out of the way...')
  271 + pkg_info = os.path.join(placeholder, file)
  272 + if os.path.isdir(pkg_info):
  273 + patched = _patch_egg_dir(pkg_info)
  274 + else:
  275 + patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
  276 +
  277 + if not patched:
  278 + log.warn('%s already patched.', pkg_info)
  279 + return False
  280 + # now let's move the files out of the way
  281 + for element in ('setuptools', 'pkg_resources.py', 'site.py'):
  282 + element = os.path.join(placeholder, element)
  283 + if os.path.exists(element):
  284 + _rename_path(element)
  285 + else:
  286 + log.warn('Could not find the %s element of the '
  287 + 'Setuptools distribution', element)
  288 + return True
  289 +
  290 +_remove_flat_installation = _no_sandbox(_remove_flat_installation)
  291 +
  292 +def _after_install(dist):
  293 + log.warn('After install bootstrap.')
  294 + placeholder = dist.get_command_obj('install').install_purelib
  295 + _create_fake_setuptools_pkg_info(placeholder)
  296 +
  297 +def _create_fake_setuptools_pkg_info(placeholder):
  298 + if not placeholder or not os.path.exists(placeholder):
  299 + log.warn('Could not find the install location')
  300 + return
  301 + pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
  302 + setuptools_file = 'setuptools-%s-py%s.egg-info' % \
  303 + (SETUPTOOLS_FAKED_VERSION, pyver)
  304 + pkg_info = os.path.join(placeholder, setuptools_file)
  305 + if os.path.exists(pkg_info):
  306 + log.warn('%s already exists', pkg_info)
  307 + return
  308 +
  309 + log.warn('Creating %s', pkg_info)
  310 + f = open(pkg_info, 'w')
  311 + try:
  312 + f.write(SETUPTOOLS_PKG_INFO)
  313 + finally:
  314 + f.close()
  315 +
  316 + pth_file = os.path.join(placeholder, 'setuptools.pth')
  317 + log.warn('Creating %s', pth_file)
  318 + f = open(pth_file, 'w')
  319 + try:
  320 + f.write(os.path.join(os.curdir, setuptools_file))
  321 + finally:
  322 + f.close()
  323 +
  324 +_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info)
  325 +
  326 +def _patch_egg_dir(path):
  327 + # let's check if it's already patched
  328 + pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
  329 + if os.path.exists(pkg_info):
  330 + if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
  331 + log.warn('%s already patched.', pkg_info)
  332 + return False
  333 + _rename_path(path)
  334 + os.mkdir(path)
  335 + os.mkdir(os.path.join(path, 'EGG-INFO'))
  336 + pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
  337 + f = open(pkg_info, 'w')
  338 + try:
  339 + f.write(SETUPTOOLS_PKG_INFO)
  340 + finally:
  341 + f.close()
  342 + return True
  343 +
  344 +_patch_egg_dir = _no_sandbox(_patch_egg_dir)
  345 +
  346 +def _before_install():
  347 + log.warn('Before install bootstrap.')
  348 + _fake_setuptools()
  349 +
  350 +
  351 +def _under_prefix(location):
  352 + if 'install' not in sys.argv:
  353 + return True
  354 + args = sys.argv[sys.argv.index('install')+1:]
  355 + for index, arg in enumerate(args):
  356 + for option in ('--root', '--prefix'):
  357 + if arg.startswith('%s=' % option):
  358 + top_dir = arg.split('root=')[-1]
  359 + return location.startswith(top_dir)
  360 + elif arg == option:
  361 + if len(args) > index:
  362 + top_dir = args[index+1]
  363 + return location.startswith(top_dir)
  364 + if arg == '--user' and USER_SITE is not None:
  365 + return location.startswith(USER_SITE)
  366 + return True
  367 +
  368 +
  369 +def _fake_setuptools():
  370 + log.warn('Scanning installed packages')
  371 + try:
  372 + import pkg_resources
  373 + except ImportError:
  374 + # we're cool
  375 + log.warn('Setuptools or Distribute does not seem to be installed.')
  376 + return
  377 + ws = pkg_resources.working_set
  378 + try:
  379 + setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
  380 + replacement=False))
  381 + except TypeError:
  382 + # old distribute API
  383 + setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
  384 +
  385 + if setuptools_dist is None:
  386 + log.warn('No setuptools distribution found')
  387 + return
  388 + # detecting if it was already faked
  389 + setuptools_location = setuptools_dist.location
  390 + log.warn('Setuptools installation detected at %s', setuptools_location)
  391 +
  392 + # if --root or --preix was provided, and if
  393 + # setuptools is not located in them, we don't patch it
  394 + if not _under_prefix(setuptools_location):
  395 + log.warn('Not patching, --root or --prefix is installing Distribute'
  396 + ' in another location')
  397 + return
  398 +
  399 + # let's see if its an egg
  400 + if not setuptools_location.endswith('.egg'):
  401 + log.warn('Non-egg installation')
  402 + res = _remove_flat_installation(setuptools_location)
  403 + if not res:
  404 + return
  405 + else:
  406 + log.warn('Egg installation')
  407 + pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
  408 + if (os.path.exists(pkg_info) and
  409 + _same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
  410 + log.warn('Already patched.')
  411 + return
  412 + log.warn('Patching...')
  413 + # let's create a fake egg replacing setuptools one
  414 + res = _patch_egg_dir(setuptools_location)
  415 + if not res:
  416 + return
  417 + log.warn('Patched done.')
  418 + _relaunch()
  419 +
  420 +
  421 +def _relaunch():
  422 + log.warn('Relaunching...')
  423 + # we have to relaunch the process
  424 + # pip marker to avoid a relaunch bug
  425 + if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']:
  426 + sys.argv[0] = 'setup.py'
  427 + args = [sys.executable] + sys.argv
  428 + sys.exit(subprocess.call(args))
  429 +
  430 +
  431 +def _extractall(self, path=".", members=None):
  432 + """Extract all members from the archive to the current working
  433 + directory and set owner, modification time and permissions on
  434 + directories afterwards. `path' specifies a different directory
  435 + to extract to. `members' is optional and must be a subset of the
  436 + list returned by getmembers().
  437 + """
  438 + import copy
  439 + import operator
  440 + from tarfile import ExtractError
  441 + directories = []
  442 +
  443 + if members is None:
  444 + members = self
  445 +
  446 + for tarinfo in members:
  447 + if tarinfo.isdir():
  448 + # Extract directories with a safe mode.
  449 + directories.append(tarinfo)
  450 + tarinfo = copy.copy(tarinfo)
  451 + tarinfo.mode = 448 # decimal for oct 0700
  452 + self.extract(tarinfo, path)
  453 +
  454 + # Reverse sort directories.
  455 + if sys.version_info < (2, 4):
  456 + def sorter(dir1, dir2):
  457 + return cmp(dir1.name, dir2.name)
  458 + directories.sort(sorter)
  459 + directories.reverse()
  460 + else:
  461 + directories.sort(key=operator.attrgetter('name'), reverse=True)
  462 +
  463 + # Set correct owner, mtime and filemode on directories.
  464 + for tarinfo in directories:
  465 + dirpath = os.path.join(path, tarinfo.name)
  466 + try:
  467 + self.chown(tarinfo, dirpath)
  468 + self.utime(tarinfo, dirpath)
  469 + self.chmod(tarinfo, dirpath)
  470 + except ExtractError:
  471 + e = sys.exc_info()[1]
  472 + if self.errorlevel > 1:
  473 + raise
  474 + else:
  475 + self._dbg(1, "tarfile: %s" % e)
  476 +
  477 +
  478 +def main(argv, version=DEFAULT_VERSION):
  479 + """Install or upgrade setuptools and EasyInstall"""
  480 + tarball = download_setuptools()
  481 + _install(tarball)
  482 +
  483 +
  484 +if __name__ == '__main__':
  485 + main(sys.argv[1:])
3  tools/doit/doc/_templates/homesidebar.html
... ... @@ -1,7 +1,8 @@
1 1 <h3>Project Links</h3>
2 2 <ul>
3   - <li><a href="https://launchpad.net/doit">dev (launchpad)</a></li>
  3 + <li><a href="https://launchpad.net/doit">code &amp; bugs (launchpad)</a></li>
4 4 <li><a href="http://groups.google.co.in/group/python-doit">discussion (google)</a></li>
5 5 <li><a href="http://pypi.python.org/pypi/doit">download (PyPi)</a></li>
  6 + <li><a href="https://bitbucket.org/schettino72/doit-recipes/wiki/Home">doit-recipes</a></li>
6 7 <li><a href="http://schettino72.wordpress.com/tag/doit/">blog</a></li>
7 8 </ul>
1  tools/doit/doc/_templates/layout.html
@@ -40,7 +40,6 @@
40 40
41 41 {% endblock %}
42 42
43   -
44 43 {% block sidebarrel %}
45 44 {% endblock %}
46 45
25 tools/doit/doc/cmd_other.rst
Source Rendered
@@ -8,6 +8,7 @@ Lets use more complex example to demonstrate the command line features. The exam
8 8 .. literalinclude:: tutorial/cproject.py
9 9
10 10
  11 +
11 12 help
12 13 -------
13 14
@@ -15,7 +16,7 @@ help
15 16
16 17 You can also get help from each available command. e.g. `doit help run`.
17 18
18   -`doit help task` will deisplay information on all fields/attributes a task dictionary from a `dodo` file accepts.
  19 +`doit help task` will display information on all fields/attributes a task dictionary from a `dodo` file accepts.
19 20
20 21
21 22
@@ -32,7 +33,15 @@ list
32 33 install : install executable (TODO)
33 34
34 35
35   -The task description is taken from the first line of task function doc-string. You can also set it using the *doc* attribute on the task dictionary.
  36 +By default task name and description are listed. The task description is taken from the first line of task function doc-string. You can also set it using the *doc* attribute on the task dictionary. It is possible to ommit the description using the option *-q*/*--quiet*.
  37 +
  38 +By default sub-tasks are not listed. It can list sub-tasks using the option *--all*.
  39 +
  40 +By default task names that start with an underscore(*_*) are not listed. They are listed if the option *-p*/*--private* is used.
  41 +
  42 +Task status can be printed using the option *-s*/*--status*.
  43 +
  44 +Task's file-dependencies can be printed using the option *--deps*.
36 45
37 46
38 47
@@ -53,6 +62,7 @@ If you do not specify any task, the default tasks are "*forget*".
53 62 *doit* keeps track of which tasks are successful in the file ``.doit.db``.
54 63
55 64
  65 +
56 66 clean
57 67 ------
58 68
@@ -67,6 +77,12 @@ You can specify which task to *clean*. If no task is specified the clean operati
67 77 $ doit clean
68 78
69 79
  80 +By default if a task contains task-dependencies those are not automatically cleaned too. You can enable this using the option *-c*/*--clean-dep*.
  81 +
  82 +If you want check which tasks the clean operation would affect you can use the option *-n*/*--dry-run*.
  83 +
  84 +
  85 +
70 86 ignore
71 87 -------
72 88
@@ -91,6 +107,7 @@ It is possible to set a task to be ignored/skipped (that is not executed). This
91 107 Note the ``!!``, it means that task was ignored. To reverse the `ignore` use `forget` sub-command.
92 108
93 109
  110 +
94 111 auto
95 112 -------
96 113
@@ -104,3 +121,7 @@ auto
104 121
105 122 $ doit auto
106 123
  124 +
  125 +.. warning::
  126 +
  127 + Note that ``doit`` will *not* reload any python module. So be aware that if you are using python-actions and the source code of these files were changed it will not be affected.
11 tools/doit/doc/cmd_run.rst
Source Rendered
@@ -18,6 +18,8 @@ By default all commands are relative to ``dodo.py`` in the current folder. You c
18 18 $ doit -f release.py
19 19
20 20
  21 +*doit* can seek for the ``dodo.py`` file on parent folders if the the option ``--seek-file``