1 | all: |
---|
2 | @echo "The Makefile is used to build the distribution." |
---|
3 | @echo "In order to run web2py you do not need to make anything." |
---|
4 | @echo "just run web2py.py" |
---|
5 | clean: |
---|
6 | rm -f httpserver.log |
---|
7 | rm -f parameters*.py |
---|
8 | rm -f -r applications/*/compiled |
---|
9 | find . -name '*~' -exec rm -f {} \; |
---|
10 | find . -name '*.orig' -exec rm -f {} \; |
---|
11 | find . -name '*.rej' -exec rm -f {} \; |
---|
12 | find . -name '#*' -exec rm -f {} \; |
---|
13 | find . -name 'Thumbs.db' -exec rm -f {} \; |
---|
14 | # find . -name '.tox' -exec rm -rf {} \; |
---|
15 | # find . -name '__pycache__' -exec rm -rf {} \; |
---|
16 | find gluon/ -name '*class' -exec rm -f {} \; |
---|
17 | find applications/admin/ -name '.*' -exec rm -f {} \; |
---|
18 | find applications/examples/ -name '.*' -exec rm -f {} \; |
---|
19 | find applications/welcome/ -name '.*' -exec rm -f {} \; |
---|
20 | find . -name '*.pyc' -exec rm -f {} \; |
---|
21 | tests: |
---|
22 | python web2py.py --verbose --run_system_tests |
---|
23 | coverage: |
---|
24 | coverage erase --rcfile=gluon/tests/coverage.ini |
---|
25 | export COVERAGE_PROCESS_START=gluon/tests/coverage.ini |
---|
26 | python web2py.py --verbose --run_system_tests --with_coverage |
---|
27 | coverage combine --rcfile=gluon/tests/coverage.ini |
---|
28 | sleep 1 |
---|
29 | coverage html --rcfile=gluon/tests/coverage.ini |
---|
30 | update: |
---|
31 | wget -O gluon/contrib/feedparser.py http://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py |
---|
32 | wget -O gluon/contrib/simplejsonrpc.py http://rad2py.googlecode.com/hg/ide2py/simplejsonrpc.py |
---|
33 | echo "remember that pymysql was tweaked" |
---|
34 | rmfiles: |
---|
35 | ### clean up baisc apps |
---|
36 | rm -f routes.py |
---|
37 | rm -rf applications/*/sessions/* |
---|
38 | rm -rf applications/*/errors/* | echo 'too many files' |
---|
39 | rm -rf applications/*/cache/* |
---|
40 | rm -rf applications/admin/databases/* |
---|
41 | rm -rf applications/welcome/databases/* |
---|
42 | rm -rf applications/examples/databases/* |
---|
43 | rm -rf applications/admin/uploads/* |
---|
44 | rm -rf applications/welcome/uploads/* |
---|
45 | rm -rf applications/examples/uploads/* |
---|
46 | src: |
---|
47 | ### Use semantic versioning |
---|
48 | echo 'Version 2.19.1-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION |
---|
49 | ### rm -f all junk files |
---|
50 | make clean |
---|
51 | # make rmfiles |
---|
52 | ### make welcome layout and appadmin the default |
---|
53 | cp applications/welcome/views/appadmin.html applications/admin/views |
---|
54 | cp applications/welcome/views/appadmin.html applications/examples/views |
---|
55 | cp applications/welcome/controllers/appadmin.py applications/admin/controllers |
---|
56 | cp applications/welcome/controllers/appadmin.py applications/examples/controllers |
---|
57 | ### build web2py_src.zip |
---|
58 | echo '' > NEWINSTALL |
---|
59 | mv web2py_src.zip web2py_src_old.zip | echo 'no old' |
---|
60 | cd ..; zip -r --exclude=**.git** --exclude=**.tox** --exclude=**_pycache__** web2py/web2py_src.zip web2py/web2py.py web2py/anyserver.py web2py/fabfile.py web2py/gluon/* web2py/extras/* web2py/handlers/* web2py/examples/* web2py/README.markdown web2py/LICENSE web2py/CHANGELOG web2py/NEWINSTALL web2py/VERSION web2py/MANIFEST.in web2py/scripts/*.sh web2py/scripts/*.py web2py/applications/admin web2py/applications/examples/ web2py/applications/welcome web2py/applications/__init__.py web2py/site-packages/__init__.py web2py/gluon/tests/*.sh web2py/gluon/tests/*.py |
---|
61 | |
---|
62 | mdp: |
---|
63 | make src |
---|
64 | make app |
---|
65 | make win |
---|
66 | app: |
---|
67 | python2.7 -c 'import compileall; compileall.compile_dir("gluon/")' |
---|
68 | #python web2py.py -S welcome -R __exit__.py |
---|
69 | #cd ../web2py_osx/site-packages/; unzip ../site-packages.zip |
---|
70 | #find gluon -path '*.pyc' -exec cp {} ../web2py_osx/site-packages/{} \; |
---|
71 | #cd ../web2py_osx/site-packages/; zip -r ../site-packages.zip * |
---|
72 | cp ../web2py_osx/site-packages.zip ../web2py_osx/web2py/web2py.app/Contents/Resources/lib/python2.7 |
---|
73 | find gluon -path '*.py' -exec cp -r --parents {} ../web2py_osx/web2py/web2py.app/Contents/Resources/ \; |
---|
74 | cp README.markdown ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
75 | cp NEWINSTALL ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
76 | cp LICENSE ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
77 | cp VERSION ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
78 | cp CHANGELOG ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
79 | cp -r extras ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
80 | cp -r examples ../web2py_osx/web2py/web2py.app/Contents/Resources |
---|
81 | cp -r applications/admin ../web2py_osx/web2py/web2py.app/Contents/Resources/applications |
---|
82 | cp -r applications/welcome ../web2py_osx/web2py/web2py.app/Contents/Resources/applications |
---|
83 | cp -r applications/examples ../web2py_osx/web2py/web2py.app/Contents/Resources/applications |
---|
84 | cp applications/__init__.py ../web2py_osx/web2py/web2py.app/Contents/Resources/applications |
---|
85 | cd ../web2py_osx; zip -r web2py_osx.zip web2py |
---|
86 | |
---|
87 | mv ../web2py_osx/web2py_osx.zip . |
---|
88 | win: |
---|
89 | #cd ../web2py_win/library/; zip -r ../library.zip * |
---|
90 | cp ../web2py_win/library.zip ../web2py_win/web2py |
---|
91 | find gluon -path '*.py' -exec cp -r --parents {} ../web2py_win/web2py/ \; |
---|
92 | cp README.markdown ../web2py_win/web2py/ |
---|
93 | cp NEWINSTALL ../web2py_win/web2py/ |
---|
94 | cp LICENSE ../web2py_win/web2py/ |
---|
95 | cp VERSION ../web2py_win/web2py/ |
---|
96 | cp CHANGELOG ../web2py_win/web2py/ |
---|
97 | cp -r extras ../web2py_win/web2py/ |
---|
98 | cp -r examples ../web2py_win/web2py/ |
---|
99 | cp -r applications/admin ../web2py_win/web2py/applications |
---|
100 | cp -r applications/welcome ../web2py_win/web2py/applications |
---|
101 | cp -r applications/examples ../web2py_win/web2py/applications |
---|
102 | cp applications/__init__.py ../web2py_win/web2py/applications |
---|
103 | # per https://github.com/web2py/web2py/issues/1716 |
---|
104 | mv ../web2py_win/web2py/_ssl.pyd ../web2py_win/web2py/_ssl.pyd.legacy | echo 'done' |
---|
105 | cd ../web2py_win; zip -r web2py_win.zip web2py |
---|
106 | mv ../web2py_win/web2py_win.zip . |
---|
107 | run: |
---|
108 | python2.7 web2py.py -a hello |
---|
109 | commit: |
---|
110 | python web2py.py --run_system_tests |
---|
111 | make src |
---|
112 | echo '' > NEWINSTALL |
---|
113 | hg commit -m "$(S)" |
---|
114 | git commit -a -m "$(S)" |
---|
115 | push: |
---|
116 | hg push |
---|
117 | git push |
---|
118 | git push --tags |
---|
119 | tag: |
---|
120 | git tag -l '$(S)' |
---|
121 | hg tag -l '$(S)' |
---|
122 | make commit S='$(S)' |
---|
123 | make push |
---|
124 | pip: |
---|
125 | # create Web2py distribution for upload to Pypi |
---|
126 | # after upload clean Web2py sources with rm -R ./dist |
---|
127 | # http://guide.python-distribute.org/creation.html |
---|
128 | python setup.py sdist |
---|
129 | sudo python setup.py register |
---|
130 | sudo python setup.py sdist upload |
---|