-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
168 lines (128 loc) · 3.73 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
PATHNAME=$(shell pwd)
BASENAME=$(shell basename $(PATHNAME))
TAG=`echo "print __version__" > v.py; cat cloudmesh/__init__.py v.py > /tmp/v1.py; python /tmp/v1.py; rm /tmp/v1.py v.py`
all:
make -f Makefile force
stats:
pep8 --statistics --filename *.py */*.py */*/*.py */*/*/*.py */*/*/*/*.py */*/*/*/*/*.py
autopep8:
autopep8 -i */*.py
autopep8 -i */*/*.py
autopep8 -i */*/*/*.py
autopep8 -i */*/*/*/*.py
autopep8 -i */*/*/*/*/*.py
autopep8 -i */*/*/*/*/*/*.py
######################################################################
# GIT INTERFACES
######################################################################
push:
make -f Makefile clean
git commit -a
git push
pull:
git pull
gregor:
git config --global user.name "Gregor von Laszewski"
git config --global user.email laszewski@gmail.com
git-ssh:
git remote set-url origin git@github.com:cloudmesh/$(BASENAME).git
######################################################################
# INSTALLATION
######################################################################
req:
pip install -r requirements.txt
dist:
make -f Makefile pip
sdist: clean
#make -f Makefile clean
python setup.py sdist --format=bztar,zip
force:
make -f Makefile nova
make -f Makefile pip
pip install -U dist/*.tar.gz
install:
pip install dist/*.tar.gz
######################################################################
# PYPI
######################################################################
upload:
make -f Makefile pip
# python setup.py register
python setup.py sdist upload
pip-register:
python setup.py register
######################################################################
# QC
######################################################################
qc-install:
pip install pep8
pip install pylint
pip install pyflakes
qc:
pep8 ./cloudmesh/virtual/cluster/
pylint ./cloudmesh/virtual/cluster/ | less
pyflakes ./cloudmesh/virtual/cluster/
# #####################################################################
# CLEAN
# #####################################################################
clean:
rm -rf *.egg
find . -name "*~" -exec rm {} \;
find . -name "*.pyc" -exec rm {} \;
rm -rf build doc/build dist *.egg-info *~ #*
cd doc; make clean
rm -rf *.egg-info
rm -rf *.log *.pid
uninstall:
yes | pip uninstall cloudmesh
#############################################################################
# SPHINX DOC
###############################################################################
sphinx:
cd doc; make html
ifeq ("$(shell uname)","Darwin")
open doc/build/html/index.html
endif
#############################################################################
# PUBLISH GIT HUB PAGES
###############################################################################
gh-pages:
git checkout gh-pages
make pages
######################################################################
# TAGGING
######################################################################
print_tag:
@echo "VERSION: $(TAG)"
tag:
@echo "VERSION: $(TAG)"
make clean
python bin/util/next_tag.py
git tag $(TAG)
echo $(TAG) > VERSION.txt
git add .
git commit -m "adding version $(TAG)"
git push
######################################################################
# ONLY RUN ON GH-PAGES
######################################################################
PROJECT=`basename $(PWD)`
DIR=/tmp/$(PROJECT)
DOC=$(DIR)/doc
pages: ghphtml ghpgit
echo done
ghphtml:
cd /tmp
rm -rf $(DIR)
cd /tmp; git clone git://github.com/cloudmesh/$(PROJECT).git
cp $(DIR)/Makefile .
cd $(DOC); ls; make html
rm -fr _static
rm -fr _source
rm -fr *.html
cp -r $(DOC)/build/html/* .
ghpgit:
git add . _sources _static
git commit -a -m "updating the github pages"
git push
git checkout master