| 
530
 | 
     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()
 |