Mercurial > hg > config
comparison python/new-python-project.py @ 530:772c61f04ccf
python/new-python-project.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 24 Sep 2013 21:22:26 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
529:b2ca27f83d5f | 530:772c61f04ccf |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 """ | |
4 makes a new python project. | |
5 """ | |
6 | |
7 import subprocess | |
8 | |
9 | |
10 - Make or utilize a virutalenv | |
11 | |
12 @requires("makeitso") | |
13 - Make a project skeleton: | |
14 | |
15 makeitso python-project -o ${PROJECT} | |
16 | |
17 - Make a (mercurial) repository: | |
18 | |
19 hg init . | |
20 hg add | |
21 hg commit -m '${PROJECT}: initial stub' | |
22 | |
23 - Push upstream: | |
24 | |
25 ssh k0s.org | |
26 cd hg; hg init ${PROJECT} | |
27 exit | |
28 hgrc http://k0s.org/hg/${PROJECT} > .hg/hgrc | |
29 hg push | |
30 """ | |
31 | |
32 # see also | |
33 # http://blog.ishans.info/2012/06/10/adding-a-template-for-new-python-files-in-emacs/ | |
34 | |
35 import optparse | |
36 import sys | |
37 | |
38 | |
39 def main(args=sys.argv[1:]): | |
40 pass | |
41 | |
42 if __name__ == '__main__': | |
43 main() |