-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
174 lines (132 loc) · 3.87 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
UNAME := $(shell uname)
BROWSER=firefox
ifeq ($(UNAME), Darwin)
BROWSER=open
endif
ifeq ($(UNAME), Linux)
BROWSER=xdg-open
endif
ifeq ($(UNAME), Windows)
BROWSER=/cygdrive/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe
endif
ifeq ($(UNAME), CYGWIN_NT-6.3)
BROWSER=/cygdrive/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe
endif
doc: man
pip install -r requirements-doc.txt
sphinx-apidoc -f -o docs/source/code cloudmesh_client
cd docs; make html
cp -r scripts docs/build/html
simple:
cd docs; make html
#pex:
# pex -r <`pip freeze` -e cloudmesh_client.shell.cm.main -o my_virtualenv.pex
watch:
watchmedo shell-command --patterns="*.rst" --recursive --command='make doc'
d:
rm -rf build
pip uninstall -y cloudmesh_client
pip uninstall -y cloudmesh_client
python setup.py install; python cloudmesh_client/db/CloudmeshDatabase.py
cm hpc run uname --cluster=india
db:
rm -f ~/.cloudmesh/cloudmesh.db
cm default list
test:
echo $(UNAME)
publish:
ghp-import -n -p docs/build/html
view:
$(BROWSER) docs/build/html/index.html
c:
$(BROWSER) http://cloudmesh.github.io/client/tutorials/comet_cloudmesh.html
man: cloudmesh
cm man > docs/source/man/man.rst
# cm debug off')
# cm man | grep -A10000 \"Commands\" | sed \$d > docs/source/man/man.rst
cloudmesh:
pip install .
setup:
python setup.py install
dist: clean
python setup.py sdist --formats=gztar,zip
python setup.py bdist
python setup.py bdist_wheel
upload_test:
python setup.py sdist bdist bdist_wheel upload -r https://testpypi.python.org/pypi
upload:
python setup.py sdist bdist bdist_wheel upload -r https://pypi.python.org/pypi
log:
gitchangelog | fgrep -v ":dev:" | fgrep -v ":new:" > ChangeLog
git commit -m "chg: dev: Update ChangeLog" ChangeLog
git push
# Freeze the requirements using the order specified in the
# unconstrained list. Some packages' installation requires others to
# be installed, and `pip freeze` outputs in lexicographic order by
# default. A side-effect is that all comments in the parameter to -r
# are kept, so we pipe through egrep to remove them.
freeze:
echo "Sanity check: this package should not be installed"
if [ `pip freeze | grep -i cloudmesh-client` ]; then echo "Check failed"; return 1; fi
pip freeze -r requirements-open.txt | egrep -v '^#' >requirements.txt
######################################################################
# TESTING
######################################################################
pytest:
make -f Makefile clean
pip install -r requirements.txt
python setup.py install
cm register remote
py.test tests
nosetest:
make -f Makefile clean
pip install -r requirements.txt
python setup.py install
cm register remote
nosetests -v --nocapture tests
######################################################################
# CLEANING
######################################################################
clean:
rm -rf *.zip
rm -rf *.egg-info
rm -rf *.eggs
rm -rf docs/build
rm -rf build
rm -rf dist
find . -name '__pycache__' -delete
find . -name '*.pyc' -delete
rm -rf .tox
rm -f *.whl
######################################################################
# TAGGING
######################################################################
tag:
bin/new_version.sh
rmtag:
python setup.py rmtag
######################################################################
# DOCKER
######################################################################
docker-machine:
docker-machine create --driver virtualbox cloudmesh
docker-machine-login:
eval "$(docker-machine env cloudmesh)"
docker-build:
docker build -t laszewski/cloudmesh .
# dockerhub
docker-login:
docker login
docker-push:
docker push laszewski/cloudmesh
docker-pull:
docker pull laszewski/client
#
# does not work yet
#
docker-clean-images:
bin/docker-clean-images
docker-cm:
docker build -t cloudmesh .
docker-run:
docker run -t -i cloudmesh /bin/bash