forked from lovelysystems/robotframework-imaplibrary
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
66 lines (52 loc) · 2.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 2015-2016 Richard Huang <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LIBRARY_NAME = ImapLibrary
lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
.PHONY: help test
help:
@echo targets: clean, clean_dist, version, install_devel_deps, lint, test, doc, github_doc, testpypi, pypi
clean:
python setup.py clean --all
rm -rf .coverage htmlcov src/*.egg-info
find . -iname "*.pyc" -delete
find . -iname "__pycache__" | xargs rm -rf {} \;
clean_dist:
rm -rf dist
version:
python -m robot.libdoc src/$(LIBRARY_NAME) version
install_devel_deps:
pip install -e .
pip install coverage mock
lint:clean
flake8 --max-complexity 10 src/$(LIBRARY_NAME)/*.py
pylint --rcfile=setup.cfg src/$(LIBRARY_NAME)/*.py
test:clean
PYTHONPATH=./src: coverage run --source=src -m unittest discover test/utest
coverage report
doc:clean
python -m robot.libdoc src/$(LIBRARY_NAME) doc/$(LIBRARY_NAME).html
python -m analytics doc/$(LIBRARY_NAME).html
github_doc:clean
git checkout gh-pages
git merge master
git push origin gh-pages
git checkout master
testpypi:clean_dist doc
python setup.py register -r test
python setup.py sdist upload -r test --sign
@echo https://testpypi.python.org/pypi/robotframework-$(call lc,$(LIBRARY_NAME))/
pypi:clean_dist doc
python setup.py register -r pypi
python setup.py sdist upload -r pypi --sign
@echo https://pypi.python.org/pypi/robotframework-$(call lc,$(LIBRARY_NAME))/