forked from ekalinin/nodeenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
155 lines (135 loc) · 4.45 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
.PHONY: default deploy deploy-github deploy-pypi update-pypi clean tests env
default:
: do nothing when dpkg-buildpackage runs this project Makefile
deploy-github:
git tag `grep "nodeenv_version =" nodeenv.py | grep -o -E '[0-9]\.[0-9]{1,2}\.[0-9]{1,2}'`
git push --tags origin master
deploy-pypi:
rm -rf dist
python setup.py sdist bdist_wheel
twine upload --repository pypi dist/*
update-pypi:
python setup.py register
deploy: contributors deploy-github deploy-pypi
clean:
@rm -rf nodeenv.egg-info/
@rm -rf dist/
@rm -rf build/
@rm -rf env/
@rm -rf nodeenv/
env:
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install
env-dev:
@rm -rf env-dev && \
virtualenv --no-site-packages env-dev && \
. env-dev/bin/activate && \
pip install -r requirements-dev.txt
test1: clean
@echo " ="
@echo " = test1: separate nodejs's env"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
rm -rf nodeenv && \
nodeenv -j 4 nodeenv
test2: clean
@echo " ="
@echo " = test2: the same virtualenv's env, with 4 jobs"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -j 4 -p
test3: clean
@echo " ="
@echo " = test3: the same virtualenv's env, without any params"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -p
# https://github.com/ekalinin/nodeenv/issues/43
test4: clean
@echo " ="
@echo " = test4: system nodejs's for python3.5"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages --python=python3.5 env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -p --node=system
test5: clean
@echo " ="
@echo " = test5: prebuilt nodejs's env for python2"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages --python=python2.7 env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -p --prebuilt
test7: clean
@echo " ="
@echo " = test7: freeze for global installation"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -j 4 -p --prebuilt && \
. env/bin/activate && \
npm install -g sitemap && \
npm -v && \
node -v && \
test "`freeze | wc -l`" = "1";
test8: clean
@echo " ="
@echo " = test8: unicode paths, #49"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
rm -rf öäü && mkdir öäü && cd öäü && \
nodeenv -j 4 --prebuilt env && \
rm -rf öäü
test9: clean
@echo " ="
@echo " = test9: unicode paths, #187"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
rm -rf "test dir" && mkdir "test dir" && cd "test dir" && \
nodeenv -j 4 --prebuilt env && \
rm -rf "test dir"
test10: clean
@echo " ="
@echo " = test10: unicode paths, #189"
@echo " ="
@rm -rf env && \
virtualenv --no-site-packages env && \
. env/bin/activate && \
python setup.py install && \
nodeenv -j 4 -p --prebuilt && \
nodeenv -j 4 -p --prebuilt
tests: test1 test2 test3 test4 test5 test7 test8 test9 test10 clean
ut: env-dev
@. env-dev/bin/activate && tox -e py27
contributors:
@echo "Nodeenv is written and maintained by Eugene Kalinin." > AUTHORS
@echo "" >> AUTHORS
@echo "Patches and Suggestions" >> AUTHORS
@echo '```````````````````````' >> AUTHORS
@echo "" >> AUTHORS
@git log --raw | grep "^Author: " | \
sort | uniq -c | sort -n -r | \
cut -d ':' -f 2 | sed 's/^/- /' | \
cut -d '<' -f1 | uniq | grep -v Kalinin >> AUTHORS