File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
3
- # This script allows easy testing of the template project. The first argument
4
- # is the directory to which to copy and generate the template project. All
5
- # other arguments go directly to tox.
3
+ # This script allows easy testing of the template project. The only argument
4
+ # is the directory to which to copy and generate the template project.
6
5
7
6
from __future__ import print_function
8
7
import os
11
10
12
11
13
12
def main (argv ):
14
- if len (argv ) == 1 :
15
- print ('Usage: {0} GEN_PATH [TOX_ARGS...]' , file = sys . stderr )
13
+ if len (argv ) != 2 :
14
+ raise SystemExit ('Usage: {0} GEN_PATH' . format ( argv [ 0 ]) )
16
15
17
16
# Get the project root directory.
18
17
project_root = os .path .dirname (os .path .dirname (
@@ -28,13 +27,18 @@ def main(argv):
28
27
import generate
29
28
generate .main ()
30
29
30
+ # Don't run tox for now, because there are reasons to generate the project
31
+ # and not run tox immediately, such as testing sdist, testing Paver tasks,
32
+ # etc. Just suggest running `tox' or `detox' manually afterward in the
33
+ # shell script.
34
+
31
35
# Run tox.
32
- import tox
36
+ # import tox
33
37
# tox will raise SystemExit() and try to exit. We don't want that.
34
- try :
35
- tox .cmdline (argv [2 :])
36
- except SystemExit :
37
- pass
38
+ # try:
39
+ # tox.cmdline(argv[2:])
40
+ # except SystemExit:
41
+ # pass
38
42
39
43
# Print out the directory name for the shell script.
40
44
print (temp_dir )
Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ ppt_finished() {
23
23
}
24
24
25
25
echo
26
+ echo " Run \` tox' or \` detox' to test the project."
26
27
echo " Run \` ppt_finished' when done to return to the template project and delete this directory."
You can’t perform that action at this time.
0 commit comments